This tip is useful either for ppl with lots of RAM or less RAM. There is a way to set how your linux control the utilization of RAM and SWAP space called “swappiness”.
There is a range from 0 to 100 in swappiness setting, higher value means the system will move idle memory usage to SWAP file more often. Please note that by setting to “0″ does not men it disabled the SWAP space, this will just make the system write to the SWAP space as little as possible.
To check your current swappiness setting type:
#cat /proc/sys/vm/swappiness
60
You will see 60 by default, you can change it to other value to try out the effect before permanently change it in the configuration file:
#sysctl -w vm.swappiness=10
vm.swappiness = 10
Put a value between 0 to 100 above and then run a some high resources program to try out the different. After you hve found the best setting then you can set it to your server configuration.
#vi /etc/sysctl.conf
add the line: “vm.swappiness=10″ without the quote to the end of the file.
This way your swappiness will be set to 10 after the next reboot.

Be The First To Comment
Related Post
Please Leave Your Comments Below