Re: Memory under KVM?

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

 



On Wed December 16 2009, Avi Kivity wrote:
> On 12/16/2009 11:58 AM, Thomas Fjellstrom wrote:
> >> It depends on what your expectations are.  If you have a lot of memory
> >> you might be surprised when you access an idle guest and have to wait
> >> for it to page itself back from disk.
> >
> > Why would it be swaping in that case? Only unused/free/cache memory
> > should be returned to the host

Unless of course you were referring to the case of manually de-ballooning 
memory in the guests. Yes, swapping in the guests is slow, and you should 
try not to set the memory limit (-m) too small for a given workload.

Having a dynamic ballooning feature that did not actually change the guests 
view of ram wouldn't have that problem, especially since you're not 
returning any memory that's in use in the guest. And since KVM already 
supports running with large ranges of its assigned memory not actually 
assigned to it, dynamic ballooning probably isn't hard to support.

The memory over-commit "rate" on my old setup was rather astonishing. A 
couple of my guests would eventually get as low as showing 10MB ram in use. 
Even the larger memory users would get down as low as 1/5th the allocated 
ram after sitting mostly idle for a while. But since the full assigned ram 
is sometimes needed, just reducing the total assignment isn't a good option.

> Right, it would return cache memory, and when you use the guest next 
> time, it will have to refill its cache.

Sure, but there are hours where the guests can run with minimal memory use. 
It would allow one to run many more guests at the same time, if you know 
some/many of them won't always be using all of their assigned ram.

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