public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Helge Hafting <helgehaf@idb.hist.no>
To: bill davidsen <davidsen@tmr.com>, linux-kernel@vger.kernel.org
Subject: Re: time tells all about kernel VM's
Date: Wed, 24 Oct 2001 11:07:19 +0200	[thread overview]
Message-ID: <3BD684C7.6BF5442B@idb.hist.no> (raw)
In-Reply-To: <3BD51F02.92B9B7F3@idb.hist.no> <uzjB7.3848$MX4.655317120@newssvr17.news.prodigy.com>

bill davidsen wrote:
[...]
> | And what app to kill in such a situation?
> | You had a single memory pig, but it aint necessarily so.
> 
> I think the problem is not killing the wrong thing, but not killing
> anything... 

The OOM killer never ever kills anything when the machine _isn't_ OOM.
That is not its job.  The OOM killer is there fix one particular 
crisis:  When memory is needed for further processing but none
at all exists.  It kills a process when the alternative is
a kernel crash.

The OOM killer is not there to make your machine perform
reasonably, it is not a load control measure.

> We can argue any old factors for selection, but I would
> first argue that the real problem is that nothing was killed because the
> problem was not noticed.

What I am saying is that you need another killer.  The machine wasn't
OOM,
so of course the OOM killer didn't notice.  It was merely using
its memory in a stupid way, causing extremely bad performance.  It isn't
OOM when there's 600M in buffers - all those may be freed.

Fixing this case would be nice.  But overload scenarios are
still possible, so what you want is probably an overload killer.

> One possible way to recognize the problem is to identify the ratio of
> page faults to time slice used and assume there is trouble in River City
> if that gets high and stays high. I leave it to the VM gurus to define
> "high," but processes which continually block for page fault as opposed
> to i/o of some kind are an indication of problems, and likely to be a
> factor in deciding what to kill.

Note that it is possible to have a machine that perform excellent
even if one process is trashing to hell (and spending weeks on
a 5-minute task due to trashing.)

How?  This is possible if the process isn't allowed to use more
than some reasonable fraction of RAM.  It can swap a lot if it
needs more, but other, more reasonable processes will run
at full speed and not swap and get enough cache for file io.
(You definitely want
swap on a separate spindle in this case, or you loose IO
performance for the other processes.)

I believe som os'es, like VMS, can do this.
The problem with this approach is administration.  There is no
automatic way to estimate how much RAM is reasonable for a process.

A big simulation with no IO can reasonably use 99% of the memory on
a dedicated machine.  But doing that would kill both desktop
and server machines.  So administrators would have to set memory
quotas for every process, which is a lot of work.  

And you may have to set quotas for every run - so you can't
just stick it in a script.  Gcc is one example - I have memory
enough to run several in parallel for a kernel compile,
but I run only one for a big C++ compile.

Helge Hafting

  parent reply	other threads:[~2001-10-24  9:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-23  3:04 time tells all about kernel VM's safemode
2001-10-23  5:02 ` safemode
2001-10-23  7:40 ` Helge Hafting
2001-10-23 19:30   ` bill davidsen
2001-10-23 23:22     ` safemode
2001-10-23 23:30     ` safemode
2001-10-24  9:07     ` Helge Hafting [this message]
2001-10-23 11:33 ` Rik van Riel
2001-10-23 23:42 ` Rik van Riel
2001-10-24  2:08   ` safemode
2001-10-24 11:55     ` safemode
2001-10-24 18:05       ` Luigi Genoni
2001-10-24 18:36         ` safemode
2001-10-24 19:57       ` Mike Fedyk
     [not found] <200110241836.f9OIaa9l002350@Expansa.sns.it>
2001-10-24 22:01 ` Luigi Genoni

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=3BD684C7.6BF5442B@idb.hist.no \
    --to=helgehaf@idb.hist.no \
    --cc=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    /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