Re: ~500 megs cached yet 2.6.5 goes into swap hell

From: Andrew Morton
Date: Wed Apr 28 2004 - 22:22:47 EST


Marc Singer <elf@xxxxxxxxx> wrote:
>
> > That's what people have been asking for. What are you suggesting should
> > happen instead?
>
> I'm thinking that the problem is that the page cache is greedier that
> most people expect. For example, if I could hold the page cache to be
> under a specific size, then I could do some performance measurements.
> E.g, compile kernel with a 768K page cache, 512K, 256K and 128K. On a
> machine with loads of RAM, where's the optimal page cache size?

Nope, there's no point in leaving free memory floating about when the
kernel can and will reclaim clean pagecache on demand.

What you discuss above is just an implementation detail. Forget it. What
are the requirements? Thus far I've seen

a) updatedb causes cache reclaim

b) updatedb causes swapout

c) prefer that openoffice/mozilla not get paged out when there's heavy
pagecache demand.

For a) we don't really have a solution. Some have been proposed but they
could have serious downsides.

For b) and c) we can tune the pageout-vs-cache reclaim tendency with
/proc/sys/vm/swappiness, only nobody seems to know that.

What else is there?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/