How do you set 'swappiness'?
How do you set 'swappiness'?
Posted May 13, 2004 22:55 UTC (Thu) by ArsonSmith (guest, #5695)In reply to: How do you set 'swappiness'? by southey
Parent article: 2.6 swapping behavior
edit /etc/sysctl.conf
add:
vm.swappiness = <value>
replace <value> with a number 1 to 100
Many people say just to add an echo <value> > /proc/sys/vm/swappiness
but this wont persist after a reboot. sysctl is a utility provided by most distributions to set this up after reboot. You can also see what all the configurable peramiters are but running
sysctl -A
I am a fan of sysctl as it also keeps your runtime kernel configuration stuff in a central location /etc/sysctl.conf and not in various places /etc/init.d/kernel_custom_stuff or /etc/rc5.d/local or what ever other places people like to make up to put this kind of stuff.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
