From: James Stevens <James.Stevens@jrcs.co.uk>
To: kvm@vger.kernel.org
Subject: KVM and the OOM-Killer
Date: Thu, 13 May 2010 13:20:31 +0100 [thread overview]
Message-ID: <4BEBEE8F.9050508@jrcs.co.uk> (raw)
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.
James
next reply other threads:[~2010-05-13 12:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 12:20 James Stevens [this message]
2010-05-13 12:39 ` KVM and the OOM-Killer Avi Kivity
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=4BEBEE8F.9050508@jrcs.co.uk \
--to=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.