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

Nick Piggin
2004-04-29T00:43:30Z

Jeff Garzik wrote:
> Brett E. wrote:
>
>> exits, freeing up the malloc'ed memory. This brings free memory up by
>> 400 megs and brings the cache down to close to 0, of course the cache
>
>
> Yeah, I have something similar (attached). Run it like
>
> fillmem <number-of-megabytes>
>
>
>> grows right afterwards. It would be nice to cap the cache
>> datastructures in the kernel but I've been posting about this since
>> September to no avail so my expectations are pretty low.
>
>
> This is a frequent request... although I disagree with a hard cap on
> the cache, I think the request (and similar ones) should hopefully
> indicate to the VM gurus that the kernel likes cache better than anon
> VMAs that must be swapped out.
>

For 2.6.6-rc2-mm2:
http://www.kerneltrap.org/~npiggin/vm-rollup.patch.gz

/proc/sys/vm/mapped_page_cost - indicate which *you* like better ;)