From: ebiederm@xmission.com (Eric W. Biederman)
To: Rik van Riel <riel@conectiva.com.br>
Cc: Slats Grobnik <kannzas@excite.com>,
linux-mm@kvack.org, Andrew Morton <andrewm@uow.edu.au>
Subject: Re: [PATCH] a simple OOM killer to save me from Netscape
Date: 14 Apr 2001 01:00:20 -0600 [thread overview]
Message-ID: <m1ofu0t18b.fsf@frodo.biederman.org> (raw)
In-Reply-To: Rik van Riel's message of "Fri, 13 Apr 2001 13:20:07 -0300 (BRST)"
Rik van Riel <riel@conectiva.com.br> writes:
> On 13 Apr 2001, Eric W. Biederman wrote:
>
> > > Any suggestions for making Slats' ideas more generic so they work
> > > on every system ?
> >
> > Well I don't see how thrashing is necessarily connected to oom
> > at all. You could have Gigs of swap not even touched and still
> > thrash.
>
> OOM leads to thrashing, however.
>
> If we run out of memory and swap, all we can evict are the
> filesystem-backed parts of memory, which includes mapped
> executables. This is how OOM and thrashing are connected.
I agree. I just said there wasn't necessarily a connection.
> What we'd like to see is have the OOM killer act before the
> system thrashes ... if only because this thrashing could mean
> we never actually reach OOM because everything grinds to a
> halt.
Seriously you could do this in user-space with a 16KB or so mlocked
binary. If you can detected OOM before thrashing I don't have a
problem. But acting before OOM hits can be a pain.
Suppose you have a computation that has been running for a month. You
failed to add enough swap for it to run comfortably, and you forgot to
write check-pointing code. It starts thrashing, but eventually it
will complete in another week pushing the system to the edge of OOM
the whole time (It will only use another hour of cpu in that time).
The OOM killer is broken if it kills this application.
But assuming we have swap-cache reclaim going on. The conditions for
OOM are fairly simple.
- All-caches are shrunk to minimal.
- We have no swap-cache pages.
- We have no swap.
- We have no mmaped pages in core.
- We have no ram (except a very small portion reserved for the kernel).
> Thrashing when we still have swap free is an entirely different
> matter, which I want to solve with load control code. That is,
> when the load gets too high, we temporarily suspend processes
> to bring the load down to more acceptable levels.
That's not bad but when it starts coming to policy, the policy
decisions are much more safely made in user space rather than the
kernel. And we just allow the kernel to completely swap-out suspended
processes.
Hmm. The more I look at this the more I keep thinking we should have a
process management daemon, enforcing some of these interesting
policies. This would have to be small so it could be mlocked, and it
should take care of the following tasks.
- Suspending processes in a high load/thrashing situation
- Creating swap files when we approach oom.
- Killing processes when oom is close and we can't add swap.
But since I can kill the daemon I don't have to use it.
Eric
--
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.eu.org/Linux-MM/
next prev parent reply other threads:[~2001-04-14 7:00 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-12 16:58 Slats Grobnik
2001-04-12 18:25 ` Rik van Riel
2001-04-12 18:49 ` James A. Sutherland
2001-04-13 6:45 ` Eric W. Biederman
2001-04-13 16:20 ` Rik van Riel
2001-04-14 1:20 ` Stephen C. Tweedie
2001-04-16 21:06 ` James A. Sutherland
2001-04-16 21:40 ` Jonathan Morton
2001-04-16 22:12 ` Rik van Riel
2001-04-16 22:21 ` James A. Sutherland
2001-04-17 14:26 ` Jonathan Morton
2001-04-17 19:53 ` Rik van Riel
2001-04-17 20:44 ` James A. Sutherland
2001-04-17 20:59 ` Jonathan Morton
2001-04-17 21:09 ` James A. Sutherland
2001-04-14 7:00 ` Eric W. Biederman [this message]
2001-04-15 5:05 ` Rik van Riel
2001-04-15 5:20 ` Rik van Riel
2001-04-16 11:52 ` Szabolcs Szakacsits
2001-04-16 12:17 ` suspend processes at load (was Re: a simple OOM ...) Szabolcs Szakacsits
2001-04-17 19:48 ` Rik van Riel
2001-04-18 21:32 ` Szabolcs Szakacsits
2001-04-18 20:38 ` James A. Sutherland
2001-04-18 23:25 ` Szabolcs Szakacsits
2001-04-18 22:29 ` Rik van Riel
2001-04-19 10:14 ` Stephen C. Tweedie
2001-04-19 13:23 ` Szabolcs Szakacsits
2001-04-19 2:11 ` Rik van Riel
2001-04-19 7:08 ` James A. Sutherland
2001-04-19 13:37 ` Szabolcs Szakacsits
2001-04-19 12:26 ` Christoph Rohland
2001-04-19 12:30 ` James A. Sutherland
2001-04-19 9:15 ` James A. Sutherland
2001-04-19 18:34 ` Dave McCracken
2001-04-19 18:47 ` James A. Sutherland
2001-04-19 18:53 ` Dave McCracken
2001-04-19 19:10 ` James A. Sutherland
2001-04-20 14:58 ` Rik van Riel
2001-04-21 6:10 ` James A. Sutherland
2001-04-19 19:13 ` Rik van Riel
2001-04-19 19:47 ` Gerrit Huizenga
2001-04-20 12:44 ` Szabolcs Szakacsits
2001-04-19 20:06 ` James A. Sutherland
2001-04-20 12:29 ` Szabolcs Szakacsits
2001-04-20 11:50 ` Jonathan Morton
2001-04-20 13:32 ` Szabolcs Szakacsits
2001-04-20 14:30 ` Rik van Riel
2001-04-22 10:21 ` James A. Sutherland
2001-04-20 12:25 ` Szabolcs Szakacsits
2001-04-21 6:08 ` James A. Sutherland
2001-04-20 12:18 ` Szabolcs Szakacsits
2001-04-22 10:19 ` James A. Sutherland
2001-04-17 10:58 ` limit for number of processes Uman
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=m1ofu0t18b.fsf@frodo.biederman.org \
--to=ebiederm@xmission.com \
--cc=andrewm@uow.edu.au \
--cc=kannzas@excite.com \
--cc=linux-mm@kvack.org \
--cc=riel@conectiva.com.br \
/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