Re: virDomainMemoryStats call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2012年07月18日 17:34, Navin P wrote:
+++ Osier Yang [18/07/12 16:13 +0800]:
On 2012年07月18日 15:00, Parakkal, Navin S wrote:
Hi,

I’m using the API virDomainMemoryStats to fetch memory stats for a
domain/guest on Fedora 16/RHEL 6.3 . I don’t get these counters filled up

VIR_DOMAIN_MEMORY_STAT_UNUSED,
VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON,VIR_DOMAIN_MEMORY_STAT_AVAILABLE ,
VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT and
VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT.

These fields are supported by libvirt, but unfortunately qemu has
disabled them for monitor command query-ballon for a critical bug,
it has been for a long time. I'm not clear about how the current
status is, though I guess it's still not enabled.


Is that only for the VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON or for all the
counters ? Should i ask about the monitor command query-balloon on the qemu
list ? Do you have details of the critical bug ?


All the others are disabled except "actual". See qemu commit
07b0403dfc2b2 for more details. We might have bug if can't even
get 'actual', because your libvirt version is new enough to include
the libvirt commit:

commit 41514f7b3e4eaa18a98976c05fab771fec4ded18
Author: Osier Yang <jyang@xxxxxxxxxx>
Date:   Tue Jun 14 11:21:35 2011 +0800

    qemu: Parse current balloon value returned by query_balloon

    Qemu once supported following memory stats which will returned by
    "query_balloon":

        stat_put(dict, "actual", actual);
stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]); stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]); stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]); stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]);
        stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]);
        stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]);

    But it later disabled all the stats except "actual" by commit
    07b0403dfc2b2ac179ae5b48105096cc2d03375a.

    libvirt doesn't parse "actual", so user will always see a empty result
    with "virsh dommemstat $domain". Even qemu haven't disabled the stats,
    we should support parsing "actual".

Regards,
Osier

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]