public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* additional oom-killer tuneable worth submitting?
@ 2006-12-07 18:30 Chris Friesen
  2006-12-07 18:50 ` Jesper Juhl
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Chris Friesen @ 2006-12-07 18:30 UTC (permalink / raw)
  To: linux-kernel


The kernel currently has a way to adjust the oom-killer score via 
/proc/<pid>/oomadj.

However, to adjust this effectively requires knowledge of the scores of 
all the other processes on the system.

I'd like to float an idea (which we've implemented and been using for 
some time) where the semantics are slightly different:

We add a new "oom_thresh" member to the task struct.
We introduce a new proc entry "/proc/<pid>/oomthresh" to control it.

The "oom-thresh" value maps to the max expected memory consumption for 
that process.  As long as a process uses less memory than the specified 
threshold, then it is immune to the oom-killer.

On an embedded platform this allows the designer to engineer the system 
and protect critical apps based on their expected memory consumption. 
If one of those apps goes crazy and starts chewing additional memory 
then it becomes vulnerable to the oom killer while the other apps remain 
protected.

If a patch for the above feature was submitted, would there be any 
chance of getting it included?  Maybe controlled by a config option?

Chris

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: additional oom-killer tuneable worth submitting?
@ 2006-12-08 13:58 Al Boldi
  2006-12-08 14:56 ` Alan
  0 siblings, 1 reply; 15+ messages in thread
From: Al Boldi @ 2006-12-08 13:58 UTC (permalink / raw)
  To: linux-kernel

Alan wrote:
> > On an embedded platform this allows the designer to engineer the system
> > and protect critical apps based on their expected memory consumption.
> > If one of those apps goes crazy and starts chewing additional memory
> > then it becomes vulnerable to the oom killer while the other apps remain
> > protected.
>
> That is why we have no-overcommit support.

Alan, I think you know that this isn't really true, due to shared-libs.

> Now there is an argument for
> a meaningful rlimit-as to go with it, and together I think they do what
> you really need.

The problem with rlimit is that it works per process.  Tuning this by hand 
may be awkward and/or wasteful.  What we need is to rlimit on a global 
basis, by calculating an upperlimit dynamically, such as to avoid 
overcommit/OOM.


Thanks!

--
Al


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

end of thread, other threads:[~2006-12-08 16:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-07 18:30 additional oom-killer tuneable worth submitting? Chris Friesen
2006-12-07 18:50 ` Jesper Juhl
2006-12-07 21:25   ` Chris Friesen
2006-12-07 21:37     ` Jesper Juhl
2006-12-07 21:57       ` Chris Friesen
2006-12-07 22:25         ` Jesper Juhl
2006-12-07 19:21 ` Peter Zijlstra
2006-12-07 21:26   ` Chris Friesen
2006-12-07 23:22 ` Alan
2006-12-07 23:21   ` Chris Friesen
  -- strict thread matches above, loose matches on Subject: below --
2006-12-08 13:58 Al Boldi
2006-12-08 14:56 ` Alan
2006-12-08 15:19   ` Al Boldi
2006-12-08 15:55     ` Alan
2006-12-08 16:59       ` Al Boldi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox