linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Roger Luethi <rl@hellgate.ch>
Cc: William Lee Irwin III <wli@holomorphy.com>,
	linux-mm@kvack.org, Andrew Morton <akpm@digeo.com>
Subject: load control demotion/promotion policy
Date: Sat, 20 Dec 2003 21:33:34 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0312202125580.26393-100000@chimarrao.boston.redhat.com> (raw)

Hi,

I've got an idea for a load control / memory scheduling
policy that is inspired by the following requirements
and data points:

1) wli pointed out that one of the better performing load
   control mechanisms is one that swaps out the SMALLEST
   process (easy to swap out, removes one process worth of
   IO load from the system)

2) small processes, like root shells, should not be
   swapped out for a long time, but should be swapped
   back in relatively quickly

3) because swapping big processes in or out is a lot of
   work, we should do that infrequently

4) however, once a big process is swapped out, it should
   stay out for a long time because it greatly reduces
   the amount of memory the system needs

The swapout selection loop would be as follows:
- calculate (rss / resident time) for every process
- swap out the process where this value is lowest
- remember the rss and swapout time in the task struct

At swapin time we can do the opposite, looking at
every process in the swapped out queue and waking up
the process where (swap_rss / now - swap_time) is
the smallest.

What do you think ?

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
--
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-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

             reply	other threads:[~2003-12-21  2:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-21  2:33 Rik van Riel [this message]
2003-12-21 14:15 ` William Lee Irwin III
2003-12-21 23:55 ` Roger Luethi
2003-12-22  1:21   ` William Lee Irwin III
2003-12-23 16:13     ` Roger Luethi
2003-12-22  1:34   ` Rik van Riel
2003-12-23 16:13     ` Roger Luethi
2003-12-22  6:56   ` Andrew Morton
2003-12-23 16:14     ` Roger Luethi
2003-12-22  7:00   ` William Lee Irwin III
2003-12-22 15:12     ` Benjamin LaHaise
2003-12-22 15:18       ` William Lee Irwin III
2003-12-22 15:22         ` Benjamin LaHaise

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=Pine.LNX.4.44.0312202125580.26393-100000@chimarrao.boston.redhat.com \
    --to=riel@redhat.com \
    --cc=akpm@digeo.com \
    --cc=linux-mm@kvack.org \
    --cc=rl@hellgate.ch \
    --cc=wli@holomorphy.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