Re: Memory usage with qemu-kvm-0.12.1.1

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

 




On 01/04/2010 08:12 AM, Thomas Fjellstrom wrote:
> Would this be normal for my setup? The virt usage seems abnormally high for 
> all of my guests, especially the ones using over 800MB virt.
> 

As I understand it virtual memory usage shows the allocated address
ranges (library mappings, dynamic allocations, etc). The guest memory
will be one of the anonymous mappings - with size equal to the memory
allocated to the VM. Until the guest accesses all of its memory (or if
qemu initialized it after the malloc), even that memory is only a
notional allocation. This is standard memory usage for linux -- mallocs
only create address mappings/allocations; it is not backed with physical
RAM until accessed.

As an example I have a linux guest with 512MB of RAM. The VmSize at
startup is 892700kB, though RSS is only 59792kB. If I login to the guest
and make use of memory within it then the guest memory becomes backed
from the host side. e.g., I have a memuser program that does nothing
more than malloc memory and initialize it. For the 512M guest, I run
this program with an input arg of 512M and voila the RSS for the qemu
process jumps to 527444kB while the VmSize has not changed.

David
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux