public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Hartmann <andihartmann@freenet.de>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Kernel-Mailingliste <linux-kernel@vger.kernel.org>
Subject: Re: [2.4.18] Security: Process-Killer if machine get's out of memory
Date: Sun, 24 Mar 2002 15:08:46 +0100	[thread overview]
Message-ID: <3C9DDDEE.3000401@athlon.maya.org> (raw)
In-Reply-To: <Pine.LNX.4.44L.0203241029000.18660-100000@imladris.surriel.com>

Rik van Riel wrote:
> On Sun, 24 Mar 2002, andreas wrote:
> 
> 
>>I've got a basic question:
>>Would it be possible to kill only the process which consumes the most
>>memory in the last delta t?
> 
> 
>>rsync is an actual example for the problem, I wrote. This could be any
>>other process, eating up the memory. Then, the kernel kills wildly some
>>processes until the right process is killed - and the machine is
>>probably unavailable meanwhile.
> 
> 
> The problem is that 'rsync' might as well have been 'scientific
> calculation that ran for 3 days'.
> 
> One 'solution' could be to let the OOM killer ignore CPU usage
> of less than say 1 hour, but it'll always be heuristics that
> can go wrong in some scenario.

In that particular case, rsync eats up the memory within seconds. Not 
only 5 MB's but hundreds of MB's. Wouldn't it be possible to detect such 
behaviour and kill such processes, if they consume all the memory very 
fast (I mean RAM and SWAP-space), that is, if no more virtual memory is 
left, or let's say e.g., if 99% percent of virtual memory are used?

Processes, that consume memory during a long term run cannot be detected 
with this heuristic.

Maybe, it would be possible to sort all known processes by there memory 
usage and combine it with the speed of their memoryrequests.
If memory gets low, and there is a process, which suddenly requests a 
lot of memory, this process get's killed, even if there is another 
process, which has three times more memory allocated then the "fast 
growing" process. If all processes are growing nearly equal and memory 
gets low, the process with the most memory usage get's killed - because 
with this process, the kernel achieves the target (to get free memspace) 
best.

Advantage of combining consumption-speed and memory usage per process 
would be, that processes could be filtered, which are obviously broken. 
If the behaviour of the process is correct, than the machine hasn't 
enough memory. But this is a problem, which cannot be handled by the kernel.



Regards,
Andreas Hartmann


  reply	other threads:[~2002-03-24 14:06 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-24 12:09 [2.4.18] Security: Process-Killer if machine get's out of memory andreas
     [not found] ` <3C9DC6D0.3080606@wanadoo.fr>
2002-03-24 13:24   ` Andreas Hartmann
     [not found]     ` <3C9DD653.8090701@wanadoo.fr>
2002-03-24 13:36       ` Andreas Hartmann
2002-03-24 13:30 ` Rik van Riel
2002-03-24 14:08   ` Andreas Hartmann [this message]
2002-03-24 16:54     ` Alan Cox
2002-03-24 16:59       ` Andreas Hartmann
     [not found]     ` <3C9E48B8.9080707@ngforever.de>
2002-03-24 22:23       ` Andreas Hartmann
2002-03-24 15:58 ` Chris Swiedler
2002-03-24 16:57 ` Alan Cox
2002-03-24 16:59   ` Roy Sigurd Karlsbakk
2002-03-24 17:45     ` Rik van Riel
2002-03-24 17:57       ` Christian Bornträger
2002-03-24 18:01         ` Rik van Riel
2002-03-24 18:03         ` Bernd Petrovitsch
2002-03-24 18:23         ` Alan Cox
2002-03-24 18:37         ` Andreas Hartmann
2002-03-24 18:20     ` Alan Cox
2002-03-24 19:20     ` Itai Nahshon
2002-03-24 17:24   ` Andreas Hartmann
2002-03-24 18:22     ` Alan Cox
2002-03-24 18:23       ` Mr. James W. Laferriere
2002-03-24 19:49         ` Alan Cox
2002-03-24 19:48           ` Mr. James W. Laferriere
2002-03-24 20:39             ` Alan Cox
2002-03-24 18:32       ` Andreas Hartmann
2002-03-24 19:50         ` Alan Cox
2002-03-24 20:43           ` Paul P Komkoff Jr
2002-03-25 15:09           ` Rok Papež
2002-03-26 20:24           ` dean gaudet
2002-03-26 23:47             ` Alan Cox

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=3C9DDDEE.3000401@athlon.maya.org \
    --to=andihartmann@freenet.de \
    --cc=linux-kernel@vger.kernel.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