William Lee Irwin III wrote: > On Sun, Apr 18, 2004 at 01:37:45PM +1000, Nick Piggin wrote: > >>swappiness is pretty arbitrary and unfortunately it means >>different things to machines with different sized memory. >>Also, once you *have* gone past the reclaim_mapped threshold, >>mapped pages aren't really given any preference above >>unmapped pages. >>I have a small patchset which splits the active list roughly >>into mapped and unmapped pages. It might hopefully solve your >>problem. Would you give it a try? It is pretty stable here. > > > It would be interesting to see the results of this on Marc's system. > It's a more comprehensive solution than tweaking numbers. > Well, here is the current patch against 2.6.5-mm6. -mm is different enough from -linus now that it is not 100% trivial to patch (mainly the rmap and hugepages work). Marc if you could test this it would be great. I've been doing very swap heavy tests for the last 24 hours on a SMP system here, so it should be fairly stable. It replaces /proc/sys/vm/swappiness with /proc/sys/vm/mapped_page_cost, which is in units of unmapped pages. I have found 8 to be pretty good, so that is the default. Higher makes it less likely to evict mapped pages. Nick