From: Balbir Singh Subject: Re: KVM and the OOM-Killer Date: Fri, 14 May 2010 13:51:06 +0530 Message-ID: <20100514082106.GG3296@balbir.in.ibm.com> References: <4BEBEE8F.9050508@jrcs.co.uk> <20100514073334.GE16563@miggy.org> <4BED056B.1080804@jrcs.co.uk> Reply-To: balbir@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Cc: kvm@vger.kernel.org To: James Stevens Return-path: Received: from e23smtp08.au.ibm.com ([202.81.31.141]:42895 "EHLO e23smtp08.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754271Ab0ENIVL (ORCPT ); Fri, 14 May 2010 04:21:11 -0400 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp08.au.ibm.com (8.14.3/8.13.1) with ESMTP id o4EILMX2018579 for ; Sat, 15 May 2010 04:21:22 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o4E8L9sj1482968 for ; Fri, 14 May 2010 18:21:09 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o4E8L9Rm012956 for ; Fri, 14 May 2010 18:21:09 +1000 Content-Disposition: inline In-Reply-To: <4BED056B.1080804@jrcs.co.uk> Sender: kvm-owner@vger.kernel.org List-ID: * James Stevens [2010-05-14 09:10:19]: > > echo "-16"> /proc//oom_adj > > Thanks for that - yes, I know about "oom_adj", but it doesn't > (totally) work. "udevd" has a default of "-17" and it got killed > anyway. > > Also, the only thing this server runs is VMs so if they can't be > killed oom-killer will just run through the everything else > (syslogd, sshd, klogd, udevd, hald, agetty etc) - so on balance its > a case of which is worse? Without those daemons the system can > become inaccessible and could become unstable, so on balance it may > be better to let it kill the VMs. > > My current work-around is :- > > sync; echo 3 > /proc/sys/vm/drop_caches > Have you looked at memory cgroups and using that with limits with VMs? -- Three Cheers, Balbir