[virt-tools-list] KVM/qemu memory/currentMemory

Phil Meyer pmeyer at themeyerfarm.com
Tue Jan 4 20:48:22 UTC 2011


We have been experimenting with and trying to understand how to 
'balloon' memory inside a KVM VM.

Part of my problem was that over 15 years of experience managing Solaris 
based systems has set my assumptions incorrectly for Linux administration.

Observations:

1.  Our first tests using Fedora 13 as the guest OS and RHEL 5.5 as the 
server showed that the VM lost 200MB from currentMemory if currentMemory 
was set less than memory.

2.  Later tests indicated that the issue had gone away, and we assumed 
that moving the server to RHEL 6 was the difference.  But that was not 
the case.  At the same time, we upgraded our guest install to Fedora 14, 
and that turned out to be the difference.

3.  We determined to learn how setting memory greater than currentMemory 
affected different OSes and OS versions.

here is the Tally:

Fedora 14 guest -- OK

Centos 5.5 guest -- missing 200MB.

Ubuntu 10.04 -- missing 200MB when it worked, but in 4 out of ten cases, 
used all 8GB even though memory was set to 8GB and currentMemory was set 
to 512MB.

Windows 2k3 Used 4GB even though memory was set to 8GB and currentMemory 
was set to 512MB.

Windows 2k8r2 -- used 7.8GB even though memory was set to 8GB and 
currentMemory was set to 512MB.

These numbers were confirmed both inside the guest and on the server as 
'resident set size' of the qemu process.

My conclusion is:

The ability to predict qemu-kvm 'balloon' memory usage is client OS 
dependent.

Is this correct?

Is this intended?

Thanks!




More information about the virt-tools-list mailing list