From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail202.messagelabs.com (mail202.messagelabs.com [216.82.254.227]) by kanga.kvack.org (Postfix) with ESMTP id 35070900001 for ; Sun, 8 May 2011 04:21:23 -0400 (EDT) Received: by wyf19 with SMTP id 19so4360069wyf.14 for ; Sun, 08 May 2011 01:21:20 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 8 May 2011 16:21:20 +0800 Message-ID: Subject: Re: [Question] how to detect mm leaker and kill? From: Hillf Danton Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: David Rientjes Cc: linux-mm@kvack.org, LKML , Ingo Molnar , Andrew Morton , Yong Zhang On Sat, May 7, 2011 at 6:48 AM, David Rientjes wrote: > On Fri, 6 May 2011, Hillf Danton wrote: > >> Hi >> >> In the scenario that 2GB =C2=A0physical RAM is available, and there is a >> database application that eats 1.4GB RAM without leakage already >> running, another leaker who leaks 4KB an hour is also running, could >> the leaker be detected and killed in mm/oom_kill.c with default >> configure when oom happens? >> > > Yes, if you know the database application is going to use 70% of your > system RAM and you wish to discount that from its memory use when being > considered for oom kill, set its /proc/pid/oom_score_adj to -700. > > This is only possible on 2.6.36 and later kernels when oom_score_adj was > introduced. > > If you'd like to completely disable oom killing, set > /proc/pid/oom_score_adj to -1000. > Thank you very much, David, for cool answer to my question. Hillf -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org