From: Helge Hafting <helgehaf@aitel.hist.no>
To: thunder7@xs4all.nl
Cc: linux-kernel@vger.kernel.org
Subject: Re: Killing/balancing processes when overcommited
Date: Thu, 12 Sep 2002 10:26:30 +0200 [thread overview]
Message-ID: <3D804FB6.F310E0FB@aitel.hist.no> (raw)
In-Reply-To: 20020911182741.GA17945@middle.of.nowhere
Jurriaan wrote:
>
> From: Jim Sibley <jlsibley@us.ibm.com>
> Date: Wed, Sep 11, 2002 at 11:08:43AM -0700
> > 1 - cpu usage may not be a good measure
> > 2 - Large memory tasks may not be a good measure
> > 3 - Measuring memory by task is misleading
> > 4 - Niceness is not really useful in a multi-user environment.
> > 5 - Other numerical limits tend to be arbitrary.
>
> I was just think (feel free to point out the errors of my way):
>
> what if we used the time a program was started as a guide? The last
> programs started are killed of first.
>
> That would mean that init survives to the last, as would the daemons
> that are started when booting.
And if one of your daemons has a slow memory leak then this happens:
You go OOM after a while (hours, days) - a user program is killed.
Buth the leaky dameon is running, so after a shorter time you go OOM
again.
Another user program is killed. This goes on for a while, it becomes
hard
to log in to fix things because the freshly logged in administrator
has a very new process and is the first to go!
After a while, all user programs are gone and daemons die one by one
until the offending one goes. Or perhaps the offending damon
don't leak anymore - it might be sshd but there is not enough memory
to log in so it don't get to leak any more.
>
> Alternatively, suppose we get a very large pid-space, and at the end of
> booting there's something like
>
> echo "5000" > /proc/sys/minimum-pid-from-here-on
>
> Then, you could do:
>
> echo "5000" > proc/sys/oom_lowest_pid_to_try_killing_first
Again, a bad daemon (pid < 5000) will slowly take out everything else,
with login impossible in the meantime.
> in other words, protect a part of pid-space against oom-killing.
Any way you protect a bunch of processes might fail if the bad one
is among them. Also, the OOM killer will have to fall back
to the standard heuristic whenever there is only protected
processes left.
Helge Hafting
next prev parent reply other threads:[~2002-09-12 8:22 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-11 18:08 Killing/balancing processes when overcommited Jim Sibley
2002-09-11 18:27 ` Jurriaan
2002-09-12 8:26 ` Helge Hafting [this message]
2002-09-11 21:44 ` Alan Cox
2002-09-12 7:06 ` Tim Connors
2002-09-12 7:25 ` Giuliano Pochini
2002-09-12 16:02 ` Rik van Riel
2002-09-12 18:30 ` Thunder from the hill
2002-09-13 8:17 ` Giuliano Pochini
2002-09-13 10:22 ` Thunder from the hill
2002-09-13 12:53 ` Denis Vlasenko
2002-09-13 12:54 ` Jesse Pollard
-- strict thread matches above, loose matches on Subject: below --
2002-09-12 18:14 Jim Sibley
2002-09-12 19:00 Jim Sibley
2002-09-12 19:08 ` Thunder from the hill
2002-09-12 20:35 ` Alan Cox
2002-09-12 20:43 ` Thunder from the hill
2002-09-12 20:55 ` Alan Cox
2002-09-12 21:15 ` Thunder from the hill
2002-09-12 21:22 ` Jesse Pollard
2002-09-12 23:08 ` Alan Cox
2002-09-12 23:12 ` Thunder from the hill
2002-09-12 21:19 ` Jesse Pollard
2002-09-12 21:56 ` Thunder from the hill
2002-09-13 7:51 ` Giuliano Pochini
2002-09-13 10:17 ` Thunder from the hill
2002-09-12 19:09 ` Rik van Riel
2002-09-13 8:05 ` Giuliano Pochini
2002-09-13 10:54 ` Helge Hafting
2002-09-13 13:02 ` Giuliano Pochini
2002-09-13 16:40 ` Gerhard Mack
2002-09-13 20:23 ` Timothy D. Witham
2002-09-13 21:13 Jim Sibley
2002-09-13 22:31 ` Timothy D. Witham
2002-09-13 22:38 ` Timothy D. Witham
2002-09-13 22:44 ` Rik van Riel
2002-09-13 23:12 ` Timothy D. Witham
2002-09-16 7:29 ` Helge Hafting
2002-09-16 14:03 ` Rik van Riel
2002-09-16 18:49 ` Timothy D. Witham
2002-09-16 19:11 ` Rik van Riel
2002-09-16 20:27 ` Timothy D. Witham
2002-09-14 0:23 ` Jim Sibley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D804FB6.F310E0FB@aitel.hist.no \
--to=helgehaf@aitel.hist.no \
--cc=linux-kernel@vger.kernel.org \
--cc=thunder7@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox