Re: swapping and the value of /proc/sys/vm/swappiness

Andrew Morton
2004-09-06T20:12:32Z

Ray Bryant <raybry@sgi.com> wrote:
>
> A scan of the change logs for swappiness related changes shows nothing that
> might explain these changes. My question is: "Is this change in behavior
> deliberate, or just a side effect of other changes that were made in the vm?"

It'll be accidental side-effects arising from changes to other parts of the
page reclaim code.

> and "What kind of swappiness behavior might I expect to find in future kernels?".

Hopefully very little. Unless we choose to deliberately change the swapout
behaviour. The code in there is complex and as you've seen, has surprising
interactions. And changes have been made without sufficiently broad testing.

So I'll be setting the bar much higher for changes to vmscan.c. It takes a
*lot* of work to demonstrate that a change in there does what it's supposed
to do without breaking other things.

That being said, your tests are interesting. There's a wide spread of
results across different kernel versions and across different swappiness
settings. But the question is: which behaviour is correct for your users,
and why?