linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* load control demotion/promotion policy
@ 2003-12-21  2:33 Rik van Riel
  2003-12-21 14:15 ` William Lee Irwin III
  2003-12-21 23:55 ` Roger Luethi
  0 siblings, 2 replies; 13+ messages in thread
From: Rik van Riel @ 2003-12-21  2:33 UTC (permalink / raw)
  To: Roger Luethi; +Cc: William Lee Irwin III, linux-mm, Andrew Morton

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>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-12-23 16:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-21  2:33 load control demotion/promotion policy Rik van Riel
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox