[libvirt-users] data monitored by "virDomainBlockStats" API not consistent with ones reading from /proc/[pid]/io, and corrugated with /proc/diskstats

Eric Blake eblake at redhat.com
Wed Jun 25 18:50:50 UTC 2014


On 06/25/2014 05:11 AM, coperd wrote:

[please don't top-post on technical lists]

> Command line "virsh domblkstat $vmname vda” get the results below:
> 	vda rd_bytes 639415808
> 	vda wr_bytes 728186880
> 
> Command line "cat /proc/4438/io” get the result below:
> 	read_bytes: 772415488 
> 	write_bytes: 734040064

Bear in mind that for some file formats, such as qcow2, qemu must read
(and write) additional I/O to manage the metadata of the file in
comparison to the amount of read and writes performed on behalf of the
guest; the qemu numbers are reported from the guest perspective, not
what qemu asked the host kernel to do.  So seeing /proc/NN/io have
larger numbers than qemu makes total sense.

I'm still not clear how you are getting vcpu PID numbers for reading
from /proc; it's not something that libvirt is currently advertising.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140625/0e826aed/attachment.sig>


More information about the libvirt-users mailing list