On Fri, Nov 26, 2010 at 2:16 PM, Michael Tokarev <[email protected]> wrote:
>> Hrm, I'll have to do some more googling on this.  There's nothing
>> about it in the man pages or --help output, but I've seen it
>> references on the mailing list.  Same for KSM (as suggested in another
>> message), although would that be helpful with such a variety of VM
>> guest OSes (Debian Etch, Debian Lenny, Ubuntu Server, Windows XP,
>> Windows 2003)?
>
> KSM may help, but it wont work with hugepages (since
> the more the page size is, the less chances to find
> another page with same contents).
>
> Hugepages - see -mem-path parameter.  It's not widely
> known feature.  The idea is that you allocate hugepages
> at boot, mount hugetlbfs, and give path to it in -mem-path,
> so that instead of malloc() kvm uses mmap() there.  Or
> something of that theme.
>
> Hugepages are unswappable and unsharable (KSM), but they're
> much lighter in terms of pagetables and tlb misses.

After even more googling, and experimenting, I think we may just be
running a very poorly optimised setup, and running ourselves out of
memory because of it.  I think, and hopefully testing over the weekend
will dis/prove it, a combination of the following should resolve our
issues:
  - update Linux guest kernels to 2.6.32 or newer
  - bring guest VMs (including Windows) up-to-date and match
versions/patch-levels (maximise possibility of sharing pages)
  - enable KSM in the host
  - add "cache=none" to the disk config on the KVM command-line

Enabling KSM with the way things are currently freed up 1.2 GB of RAM
in the host.  Which was then gobbled up as buffers (now over 4 GB).
I'm guessing that's from the host caching all the writes from the
Zimbra and web servers.

Thanks,everyone, for the helpful nudges and suggestions.  If there's
anything else that may be useful, or things I should be reading up on,
let me know.  :)
-- 
Freddie Cash
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to