linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: James A. Sutherland <jas88@cam.ac.uk>
To: Jonathan Morton <chromi@cyberspace.org>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
	Rik van Riel <riel@conectiva.com.br>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	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: Mon, 16 Apr 2001 23:21:21 +0100	[thread overview]
Message-ID: <3ormdto78qla1qir8c62i2tuope82bt1u0@4ax.com> (raw)
In-Reply-To: <l03130300b701154d843c@[192.168.239.105]>

On Mon, 16 Apr 2001 22:40:31 +0100, you wrote:

>>Ideally, I'd SIGSTOP each thrashing process. That way, enough
>>processes can be swapped out and KEPT swapped out to allow others to
>>complete their task, freeing up physical memory. Then you can SIGCONT
>>the processes you suspended, and make progress that way. There are
>>risks of "deadlocks", of course - suspend X, and all your graphical
>>apps will lock up waiting for it. This should lower VM pressure enough
>>to cause X to be restarted, though...
>
>Strongly agree.  Two points that need defining for this:
>
>- When does a process become "thrashing"?  Clearly paging-in in itself is
>not a good measure, since all processes do this at startup - paging-in
>which forces other memory out, OTOH, is a prime target.

Yes... I think the best metric is how long the process is able to run
for between page faults. In short, "is it making progress?"

>- How long do we suspend it for?  Does this depend on how many times it's
>been suspended recently?

Probably, yes - in my example above, if we suspend X (blocking other
memory hogs), then unsuspend it again, we need to be sure we'll
suspend something else next cycle!

>A major point I've noticed is that a relatively small number of thrashing
>processes can force small interactive applications out of physical memory,
>too - this needs fixing urgently.
>
>Example: running 3 active memory hogs on my 256Mb physical + 256Mb swap
>machine causes XMMS to stutter and crackle; increasing the load to 4 memory
>hogs causes it to stop working completely for extended periods of time.
>The same effect can be seen on the (graphical) system monitors and on an
>SSH session in progress from outside.

Yep. Ideally, here, we'd suspend all but two of those memory hogs at
any one time. Probably suspending and restoring them in rotation, a
few seconds at a time, as a very coarse-grain scheduler? This way, all
these processes get similar amounts of CPU time, without forcing
thrashing or interactive performance degradation.

It's a very black art, this; "clever" page replacement algorithms will
probably go some way towards helping, but there will always be a point
when you really are thrashing - at which point, I think the best
solution is to suspend processes alternately until the problem is
resolved.


James.
--
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/

  parent reply	other threads:[~2001-04-16 22:21 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 [this message]
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
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=3ormdto78qla1qir8c62i2tuope82bt1u0@4ax.com \
    --to=jas88@cam.ac.uk \
    --cc=andrewm@uow.edu.au \
    --cc=chromi@cyberspace.org \
    --cc=ebiederm@xmission.com \
    --cc=kannzas@excite.com \
    --cc=linux-mm@kvack.org \
    --cc=riel@conectiva.com.br \
    --cc=sct@redhat.com \
    /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