[libvirt] libvirt to report cpuWait of a guest.
Avi Weit
WEIT at il.ibm.com
Thu Dec 3 09:24:08 UTC 2015
Hi,
We are working on fixing CPU utilization calculation of guests (VMs) in
Ceilometer metering service of OpenStack.
Per that fix, we retrieve, at the host level, se.statistics.wait_sum (or
se.wait_sum in old versions) Linux kernel schedstat counter of the
KVM/QEMU threads ? that represent the VM. That counter denotes the time in
milliseconds the thread 'wants' to run (but not actually running because
of a contention).
However, as Daniel Berrange mentioned in the fix review, it would be
better to retrieve that information from libvirt instead and he asked me
to raise this in this mailing list.
I could not notice that libvirt exposes such a counter.
It would be very good if virDomainInfo (
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainInfo) can be
added with cpuWait in addition to cpuTime it currently has so that cpuWait
will denote the total *time* the VM *wants* to run.
Adding cpuWait to any other location of domain is fine as well.
Thanks,
Avi Weit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20151203/c9cf1c2b/attachment-0001.htm>
More information about the libvir-list
mailing list