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

Marc Singer
2004-04-29T03:13:12Z

On Wed, Apr 28, 2004 at 07:35:41PM -0700, Andrew Morton wrote:
> Marc Singer <elf@buici.com> wrote:
> >
> > On Wed, Apr 28, 2004 at 06:57:20PM -0700, Andrew Morton wrote:
> > > Rik van Riel <riel@redhat.com> wrote:
> > > >
> > > > IMHO, the VM on a desktop system really should be optimised to
> > > > have the best interactive behaviour, meaning decent latency
> > > > when switching applications.
> > >
> > > I'm gonna stick my fingers in my ears and sing "la la la" until people tell
> > > me "I set swappiness to zero and it didn't do what I wanted it to do".
> >
> > It does, but it's a bit too coarse of a solution. It just means that
> > the page cache always loses.
>
> 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?