Re: Out of VM idea

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Tue, 28 Apr 1998 20:59:54 +0200 (MET DST)


On Tue, 28 Apr 1998, David Woodhouse wrote:

> H.H.vanRiel@phys.uu.nl said:
> > Following some observations from Michael Remski (sent to me by
> > private e-mail), I've come to the conlusion that we really should do
> > something about out-of-VM situations.
>
> I've had my machine descend into the aptly named "lala-thrash-land" well
> before it's out of swap. With 64Mb RAM, 64Mb of swap space in slram, and 128Mb
> of real swap, I find that the system loses its marbles when the disk swap gets
> about half full.
>
> I was running "make -j" on a 2.1.98 kernel at the time, and collected some
> data, given below. I also had s screenful of output from "vmstat 1", but I've
> lost it. I can do it again if it will help.
>
> Am I simply expecting too much of the poor thing when it's paging 128-odd Mb?
> Will I have to wait for real swapping before it gets better?

The situation you describe _is_ a little bit extreme, yes.

We probably should implement real swapping too. I've read
the NetBSD VM source today, and I've got some ideas on
how to do it...
(well, I've had better ideas, but the introduction of
free_memory_available() made them useless)

Basically, I think we should mark a process as out-of-core
each time kswapd doesn't meet it's goal.
We should select the processes on the basis of:
- non-IOPL (absolutely neccessary)
- long time in-core
- nice level
- size
- non-root (not neccesary, just a bonus)
- (maybe?) the amount of processes in this process group

Then, we should swap-in processes when:
- they've spent the maximum time swapped out
- or (even better) their priority level is above a certain thrashhold
- we've got enough memory (little paging going on)
- ??? something else ???

The first three things can probably be implemented better in
one step, ie: "if (swapin_priority(p) > vm_load) swapin(p);"

But what should the other premises for swapin/swapout be?

Rik.
+-------------------------------------------+--------------------------+
| Linux: - LinuxHQ MM-patches page | Scouting webmaster |
| - kswapd ask-him & complain-to guy | Vries cubscout leader |
| http://www.phys.uu.nl/~riel/ | <H.H.vanRiel@phys.uu.nl> |
+-------------------------------------------+--------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu