Hacker News new | ask | show | jobs
by microwavecamera 3250 days ago
A good way to minimize swapping is to adjust the swappiness setting and set it to something low. I have it set to 10 so it won't start swapping out until RAM reaches 90% utilization. Edit or add (if it's not there):

vm.swappiness = 10

...to /etc/sysctl.conf. You can change "10" to whatever works for you. The number is the percentage of free RAM before it starts swapping. You can also change it on the fly with:

sysctl vm.swappiness=10

...but you have to add it to the sysctl-conf file to make it permanent.

1 comments

Hi Microwavecamera, thanks for the information, appreciated. Cheers