[libvirt] [RFC] New libvirt API for domain memory statistics reporting
Daniel P. Berrange
berrange at redhat.com
Thu Dec 10 11:54:21 UTC 2009
On Tue, Dec 08, 2009 at 02:57:14PM -0500, Adam Litke wrote:
> When using ballooning to manage overcommitted memory on a host, a system for
> guests to communicate their memory usage to the host can provide information
> that will minimize the impact of ballooning on the guests while maximizing
> efficient use of host memory.
> The design of such a communication channel was recently added to version 0.8.2
> of the VirtIO Spec (See Appendix G):
> - http://ozlabs.org/~rusty/virtio-spec/virtio-spec-0.8.2.pdf
> Host-side and guest-side implementations have been accepted for inclusion in
> their respective projects:
> - Guest: http://lkml.org/lkml/2009/11/30/274
> - Host: http://lists.gnu.org/archive/html/qemu-devel/2009-12/msg00380.html
> The following patch series implements a new libvirt interface to expose these
> memory statistics. Thank you for your review and comments.
I've looked at the code in all the patches, and it all looks good to me.
As others have said the main issue at hand is to get a better definition
of the set of statistics we're going to have in the public struct.
Even though you have included a size_t parameter in the public API, this
does not get usa free ride for the future, because the set of fields is
also part of the RPC wire protocol ABI, and that is not so simple to deal
This is a going to be quite a popular/useful API for all of our hypervisor
drivers. It definitely something we can easily implement for VMWare ESX,
OpenVZ, and LXC drivers too. So we should try to get a struct definition
that covers the memory stats required by all
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list