Re: [patch] NEW: arca-vm-21, swapout via shrink_mmap using PG_dirty

Nimrod Zimerman (zimerman@deskmail.com)
Mon, 18 Jan 1999 20:23:03 +0200


On Mon, Jan 18, 1999 at 12:47:07AM +0100, Andrea Arcangeli wrote:

> Also you Kelle, could you try my new arca-vm-24 on your 16Mbyte machine? I
> think that you'll be very happy ;).

Cheers.

'Linux version 2.2.0-pre7-VM24 (zimerman@hexagon) (gcc version 2.7.2.3) #122
Mon Jan 18 13:01:47 IST 1999' is far better for me with 16mb now.

I just tortured it a bit (note, torturing a 16mb machine basically means
loading X, Netscape, mutt on linux-kernel of the past month and some random
stuff). Didn't break. Didn't kill anything with a SIGBUS, and was generally
quite friendly.

I'll keep working with it, and report if there are any problems.

Do note that the percentage I specified in /proc/sys/vm/pager isn't really
what the system got swapped. Even when I specified 5% (when I have 14712kb
total), and with no free physical memory, it sometimes got up to 4000kb swap.
It usually got down rather quickly, but the damage was already done and some
things got swapped needlessly.

I am not familiar with the memory system of Linux, but I do get the
impression that it trusts what I call 'side effects' to do too much of the
work, without explicitly enforcing limits. I can't see, for example, why
when adding something to an already maximized cache, some old cache block
isn't immediately thrown out, right there and then.
But, I'm not familiar with the system, so I'm probably missing something.

> Note, arca-vm-24 is tunable:
>
> /proc/sys/vm/pager has 5 entry:
>
> 6 10 32 32 2048
>
> The first is the lower priority that try_to_free_pages() uses. The most
> this value is high, the lower will be the starting priority, and this will
> result in more swapping. 6 is a rasonable value. If the system swap too
> much even if not low on memory you could decrease this value to 4 for
> example.

Can you characterize this more accurately, somehow? Being a magic value,
tuning it is not all that friendly. I'm running with '3' here, just
_because_.
Maybe, if it stays magical, there should be some auto-balancing mechanism
(in user space, probably) to try and figure out a "good" value for a
specific machine.

> running with freepages.min = 255 because I have 128Mbyte of RAM. So if
> arca-vm-24 will kill random processes on your system (search for Out of
> memory messages in `dmesg`) the first thing you should try is:

This isn't good for a stock release, I'd say. If (and when) this gets into
Linus' kernel, this has to be avoided at all costs. You don't want people
complaining that processes just died on them for no reason - this is too
Windows like.

Nimrod

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/