<div dir="ltr">I think I know why this is happening, and I think it is correct.   I ran a test again only looking at Dom0 and found that it was similar to Dom1.  The &#39;read sectors&#39; from /proc/diskstats were about 2x the pgpgin from /proc/vmstat.   This is whay I see on my physical hardware as well.   <div>
<br></div><div>The reason that I am not seeing the same results when reading data from Dom1 is because I am only looking at the physical block device (/dev/sda in this case).    When I look at the diskstats from physical device /dev/sda and device between used for blkback /dev/tda they show the 2 reads.  Since they are both &quot;block devices&quot; I assume they need to page in to make the data available.</div>
<div><br></div><div>So I think this is not really an issue, just a matter of perspective. </div><div><br></div><div>Deron</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 4:15 AM, Stefano Stabellini <span dir="ltr">&lt;<a href="mailto:stefano.stabellini@eu.citrix.com" target="_blank">stefano.stabellini@eu.citrix.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, 6 Apr 2014, Deron wrote:<br>
&gt; Hello.<br>
&gt;<br>
&gt; I have been doing some performance tests with Xen and CentOS and have found some strange statistics when comparing the<br>
&gt; virtual memory (/proc/vmstat) and I/O (/proc/diskstat) statistics between the Domain 0 and guests.  <br>
&gt;<br>
&gt; When I look at the &quot;pgpgin&quot; statistic it is exactly the same as the &quot;read sectors&quot; in Dom0.  However, when I look at<br>
&gt; the same statistics in the guest, the &quot;read sectors&quot; is exactly 2x &quot;pgpgin&quot;.<br>
&gt;<br>
&gt; I have tried this on 2 different versions, each on a different physical server. Here is an example of the statistics<br>
&gt; over a 30 second period (while running a benchmark in Dom1) in the Dom0 and Guest Domain.<br>
&gt;                        pgpgin       read sectors<br>
&gt;                        =======     =========<br>
&gt;       Dom0        1698024     1698024<br>
&gt;       Dom1          848412     1696824<br>
&gt;<br>
&gt; I have looked at some various settings to see if I could explain it.  I can&#39;t tell if the Dom1 guest kernel is<br>
&gt; reporting incorrectly, or there is some other explanation.  If anyone has any ideas about this I would appreciate any<br>
&gt; feedback.<br>
&gt;<br>
&gt; Dom 0 kernels<br>
&gt; 3.10.29-11.el6.centos.alt.x86_64<br>
&gt; 3.4.54-8.el6.centos.alt.x86_64<br>
&gt;<br>
&gt; Guest kernel<br>
&gt; 2.6.32-431.el6.x86_64<br>
<br>
The numbers that you are seeing are probably wrong due to an accounting<br>
issue in blkfront or blkback. It would be interesting to know whether<br>
this happens even with the most recent kernels.<br>_______________________________________________<br>
CentOS-virt mailing list<br>
<a href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos-virt" target="_blank">http://lists.centos.org/mailman/listinfo/centos-virt</a><br>
<br></blockquote></div><br></div>