Re: Memory under KVM?

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

 



On Sun December 13 2009, Avi Kivity wrote:
> On 12/13/2009 06:41 PM, Thomas Fjellstrom wrote:
> >> Use the balloon driver to return memory to the host.
> >
> > Will it actually just free the memory and leave the total memory size
> > in the VM alone? Last I checked it would just decrease the total memory
> > size, which isn't that useful. Sometimes it needs more ram, so its
> > given 512M ram, but most of the time can live on 100M or so.
> 
> If you balloon and than balloon back the guest will be able to
> reallocate all this memory.
> 
> >> The Linux vm prefers anonymous memory, so guests do get an advantage.
> >
> > I think the only thing I'd like to have now is automatic memory return,
> > much like vmware server has. It doesn't change what the guest VM sees,
> > it just flushes the unused ram back to the host.
> 
> Linux usually keeps very little RAM free (it's kept as cache).  So there
> has to be some action on the part of the host to get the guest to free
> things.  For Windows guests you can use ksm to reclaim free memory
> (since Windows will zero it).
> 

I'm waiting for 2.6.32 to hit Debian Sid before I start playing with ksm (I 
don't think its in 2.6.31).

The problem is it should be automatic. The balloon driver itself or some 
other mechanism should be capable of noticing when it can free up a bunch of 
guest memory. I can't be bothered to manually sit around and monitor memory 
usage on my host so I can then go into virt-manager to reduce memory to each 
guest.

What vmware server had worked great. After some time (quite a lot usually) 
something would flush the cache, and return most of the unused guest ram 
back to the host.

Also, I don't have any windows guests atm. just 2 BSDs and 5 linux guests. 
I've had to do some tweaking guest side to cut down on ram (reduce apache, 
mysql, nginx and other services threads/forks). Something that wasn't 
necessary at all with vmware server.

As I said before, that last feature is pretty much the last thing that would 
make KVM perfect for my purposes. that is, returning guest memory without 
actually changing the allocation in the guest.

-- 
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