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

Helge Hafting
2004-04-29T09:42:02Z

Brett E. wrote:
[...]
> Or how about "Use ALL the cache you want Mr. Kernel. But when I want
> more physical memory pages, just reap cache pages and only swap out when
> the cache is down to a certain size(configurable, say 100megs or
> something)."

Problem: reaping cache is equivalent to swapping in some cases.
The cache isn't merely "files read & written".
It is also all your executable code. Code is not different from
files being read at all. Dumping too much cache will dump the
code you're executing, and then it have to be reloaded from disk.

Helge Hafting