Swappiness and responsiveness on Linux desktops

24 Nov 2009

After doing a lots of db import/export/migration tasks on my Linux notebook with large DB tables, I’ve seen slow responsiveness from the system. After a small investigation I’ve seen that my OS is swapping out too much causing performance degradation and making my system unusable.

By default Linux kernel is configured for server environments. One important parameter that should be considered when using Linux as desktop is vm.swappines, by default it’s value is 60.

That’s fine for a server as it swaps out memory to disk aggressively to release it for active processes, but on desktops this value is to high, the recommended value is 10 to allow the system to be more responsive.

vitalie@silver:~$ grep vm.swappiness /etc/sysctl.conf
vm.swappiness = 10

More details: