Memory swap when there's apparently plenty of free RAM

Memory swap when there's apparently plenty of free RAM

Muli Ben-Yehuda muli at cs.technion.ac.il
Mon Jun 18 16:01:57 IDT 2012


On Mon, Jun 18, 2012 at 03:07:34PM +0300, Eli Billauer wrote:

> Any idea what happened? In particular, why triggered the swap for no
> apparent reason?

Just a guess, but it might sub-optimal VM swapiness settings. See
Documentation/sysctl/vm.txt:

swappiness

This control is used to define how aggressive the kernel will swap
memory pages.  Higher values will increase agressiveness, lower values
decrease the amount of swap.

As to why, because sometimes you want to keep empty memory frames that
are ready to be used, which implies that you page out their contents
*before* those frames need to be freed.

Cheers,
Muli



More information about the Linux-il mailing list