3 ms·
The article misses a lot. Swapping happens often even when there isn't directly pressure on memory. Because Linux very aggressively keeps recently touched fi
by maw 18y ago
The article misses a lot. Swapping happens often even when there isn't directly pressure on memory. Because Linux very aggressively keeps recently touched files cached in memory (usually, although not always, a performance win), it will swap out unused processes—again, even when there's plenty of memory to go around.
How aggressively Linux swaps stuff out can be tuned via /proc/sys/vm/swappiness, although it's arguably still too aggressive even when swappiness is given a low value.
http://lwn.net/Articles/83588/ http://lwn.net/Articles/83588/ is a little dated at this point, but overall still correct.