Re: Memory under KVM?

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

 



On Sat December 12 2009, Avi Kivity wrote:
> On 12/11/2009 11:43 PM, rek2 wrote:
> > Hi everyone, I'm new to the list and I have a couple questions that we
> > are wondering about here at work...
> > we have notice that the KVM processes on the host take much more
> > memory than the memory we have told the VM to use..  a ruff example..
> > if we tell KVM to use 2 gigs for one VM it will end up showing on the
> > host process list for that VM like 3 gigs or more...
> > Why do I ask this? well we need to figure out how much memory to add
> > to our host server so we can calculate the number of VM's we can run
> > there etc etc..
> 
> Can you give an example?  A snapshot from 'top' would do.
> 

I have the opposite happen, when a VM is started, RES is usually lower than 
-m, which I find slightly odd. But makes sense if qemu/kvm don't actually 
allocate memory from the host till its requested the first time (if only it 
would return some of it afterwards, it would be even better).

I just fully shut down and restarted on of my vms, which is set to use 
128-256 MB ram max. RES is like 72MB on start, and VIRT is 454M. RES 
generally gets up around 120MB ram when its doing something.

One thing I do find a little odd is one of my VMs which is allocated 512MB 
ram, has a VIRT of 826MB ram. I didn't realize that qemu had so many lib 
dependencies. Due to kvm not supporting giving memory back, besides by 
swapping large portions of unused guest ram, my host currently has over 1G 
used swap. Not particularly happy with that, but it doesn't seem to effect 
performance too much (except that it generally likes to swap host processes 
first, guest performance is decent, but host, not so much).

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxx
--
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