From mboxrd@z Thu Jan 1 00:00:00 1970 From: Athanasius Subject: Re: KVM and the OOM-Killer Date: Fri, 14 May 2010 08:33:34 +0100 Message-ID: <20100514073334.GE16563@miggy.org> References: <4BEBEE8F.9050508@jrcs.co.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KDt/GgjP6HVcx58l" Cc: kvm@vger.kernel.org To: James Stevens Return-path: Received: from lake.fysh.org ([81.94.195.195]:58411 "EHLO lake.fysh.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757815Ab0ENHdf (ORCPT ); Fri, 14 May 2010 03:33:35 -0400 Content-Disposition: inline In-Reply-To: <4BEBEE8F.9050508@jrcs.co.uk> Sender: kvm-owner@vger.kernel.org List-ID: --KDt/GgjP6HVcx58l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 13, 2010 at 01:20:31PM +0100, James Stevens wrote: > We have a KVM host with 48Gb of RAM and run about 20 KVM clients on it. = =20 > After some time - different time depending on the kernel version - the = =20 > VM host kernel will start OOM-Killing the VM clients, even when there is = =20 > lots of free RAM (>10Gb) and free SWAP (>34Gb). It seems going to a 64 bit kernel is what you want, but I thought it worth mentioning the available method to say "try not to OOM-kill *this* process": echo "-16" > /proc//oom_adj I go through some convolutions in starting KVM VMs so that this gets done automatically for them. It basically scores the process *way* down for consideration to be OOM-killed. Handy if you might accidentally run something on the KVM host that chews up all the available memory. It should then get killed instead of the VMs. You can also use '-17' to exclude the process from consideration entirely. See /Documentation/filesystems/proc.txt for details. --=20 - Athanasius =3D Athanasius(at)miggy.org / http://www.miggy.org/ Finger athan(at)fysh.org for PGP key "And it's me who is my enemy. Me who beats me up. Me who makes the monsters. Me who strips my confidence." Paula Cole - ME --KDt/GgjP6HVcx58l Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkvs/M0ACgkQSEDmQuIYzh2YWwCgm7C0E73Hlhv7aeX3lSn2zg39 EZQAnj7Z/meEgEmdhUvyT2SENUnaOlQG =IpPb -----END PGP SIGNATURE----- --KDt/GgjP6HVcx58l--