linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [Question] how to detect mm leaker and kill?
@ 2011-05-06 15:04 Hillf Danton
  2011-05-06 22:48 ` David Rientjes
  0 siblings, 1 reply; 3+ messages in thread
From: Hillf Danton @ 2011-05-06 15:04 UTC (permalink / raw)
  To: linux-mm; +Cc: LKML, Ingo Molnar, Yong Zhang

Hi

In the scenario that 2GB  physical 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?

thanks
          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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Question] how to detect mm leaker and kill?
  2011-05-06 15:04 [Question] how to detect mm leaker and kill? Hillf Danton
@ 2011-05-06 22:48 ` David Rientjes
  2011-05-08  8:21   ` Hillf Danton
  0 siblings, 1 reply; 3+ messages in thread
From: David Rientjes @ 2011-05-06 22:48 UTC (permalink / raw)
  To: Hillf Danton; +Cc: linux-mm, LKML, Ingo Molnar, Andrew Morton, Yong Zhang

On Fri, 6 May 2011, Hillf Danton wrote:

> Hi
> 
> In the scenario that 2GB  physical 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.

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Question] how to detect mm leaker and kill?
  2011-05-06 22:48 ` David Rientjes
@ 2011-05-08  8:21   ` Hillf Danton
  0 siblings, 0 replies; 3+ messages in thread
From: Hillf Danton @ 2011-05-08  8:21 UTC (permalink / raw)
  To: David Rientjes; +Cc: linux-mm, LKML, Ingo Molnar, Andrew Morton, Yong Zhang

On Sat, May 7, 2011 at 6:48 AM, David Rientjes <rientjes@google.com> wrote:
> On Fri, 6 May 2011, Hillf Danton wrote:
>
>> Hi
>>
>> In the scenario that 2GB  physical 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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-08  8:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-06 15:04 [Question] how to detect mm leaker and kill? Hillf Danton
2011-05-06 22:48 ` David Rientjes
2011-05-08  8:21   ` Hillf Danton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).