From: Avi Kivity <avi@redhat.com>
To: James Stevens <James.Stevens@jrcs.co.uk>
Cc: kvm@vger.kernel.org
Subject: Re: KVM and the OOM-Killer
Date: Thu, 13 May 2010 15:39:20 +0300 [thread overview]
Message-ID: <4BEBF2F8.7020507@redhat.com> (raw)
In-Reply-To: <4BEBEE8F.9050508@jrcs.co.uk>
On 05/13/2010 03:20 PM, James Stevens wrote:
> This is *NOT* a KVM issue, but may be worth adding into the FAQ...
>
>
> We have a KVM host with 48Gb of RAM and run about 20 KVM clients on
> it. After some time - different time depending on the kernel version -
> the VM host kernel will start OOM-Killing the VM clients, even when
> there is lots of free RAM (>10Gb) and free SWAP (>34Gb).
>
> This seems to be caused by the kernel running out of LOWMEM (memory
> below 1Gb) - because of the large amount of RAM a lot of LOWMEM
> (~400Mb) is used by the memory map (32 bytes per 4Kb page), add in the
> kernel itself and that leaves "only" about 460Mb of LOWMEM for kernel
> alloc.
>
> This may not have been a problem, except Linux may also put cache
> blocks and user processes in LOWMEM - it seems this can then lead to a
> LOWMEM exhaust situation which triggers OOM-Killing even when there is
> LOADS of SWAP and HIGHMEM free.
>
> Sadly, killing userland processes is not a good way to try and free
> LOWMEM, so what happens is a killing spree where by every process on
> the VM host gets killed (inc all the VMs, sysklogd, klogd, sshd, udevd
> etc).
>
> This is very bad in 2.6.32.6, quite bad in 2.6.32.9, better (but
> still bad in) 2.6.31.12 - currently testing 2.6.33.3
>
> See https://bugzilla.kernel.org/show_bug.cgi?id=15058
>
>
> General advice seems to be, if you have more than 16Gb RAM then you
> should run the VM host 64bit.
>
> We didn't see this issue on a server with 32Gb running the same set of
> VMs.
>
I'd go with 64-bit at 2GB and above. It's both faster and safer.
The lowmem load is about 0.5% of guest memory, so 48GB means 240MB
lowmem allocated. Thin ice.
Since you can run a 64-bit kernel with your existing userspace, at least
you have a simple upgrade path.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-05-13 12:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 12:20 KVM and the OOM-Killer James Stevens
2010-05-13 12:39 ` Avi Kivity [this message]
2010-05-13 13:39 ` James Stevens
2010-05-13 13:53 ` Avi Kivity
2010-05-13 18:55 ` David S. Ahern
2010-05-13 13:42 ` Johannes Stezenbach
2010-05-14 7:33 ` Athanasius
2010-05-14 8:10 ` James Stevens
2010-05-14 8:21 ` Balbir Singh
2010-05-14 8:43 ` James Stevens
2010-05-14 12:28 ` Balbir Singh
2010-05-14 13:01 ` James Stevens
2010-05-14 8:19 ` Balbir Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BEBF2F8.7020507@redhat.com \
--to=avi@redhat.com \
--cc=James.Stevens@jrcs.co.uk \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.