Re: Difference between "Max Memory" and "Used Memory"

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

 



On 11/23/2011 01:48 AM, Jérôme Gallard wrote:
> Hello,
> 
> I am new on this mailing list, so If I do something wrong, don't hesitate
> to tell me :-)

Welcome to the community.

> 
> I am using the following version of libvirt :
> Compiled against library: libvir 0.8.8
> Using library: libvir 0.8.8
> Using API: QEMU 0.8.8
> Running hypervisor: QEMU 0.14.0
> 
> I would like to understand the difference between "Max Memory" and "Used
> Memory" returned by a "virsh dominfo" command. In my configuration both
> values are equal. This surprises me because my VM is not using all its
> memory. Perhaps I miss something ?

"Max Memory" is the cap amount of memory reserved for the domain at
guest startup; qemu will not let the guest exceed this amount, but for
typical guests, it starts the guest with this much memory reserved (the
host's memory is used on-demand, though, so unless the guest actually
touches this much memory, the host does not necessarily give up this
much memory).

"Used Memory" refers to the amount of memory that the guest informs the
host that it is using.  This requires guest cooperation, via the 'virtio
memory balloon' device, so if the guest does not support this device,
qemu must treat it the same as "Max Memory".  On hosts that do support
memory ballooning (most Linux guests support it by default, and you can
install virtio drivers for Windows guests), then you can request that
the guest use less memory by way of the 'virsh setmem' command
(virDomainSetMemoryFlags API call), at which point libvirt issues a
command for the guest to use its memory balloon device in order to
reduce "Used Memory".

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

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux