Friday 13 April 2012

Linux Kernel Performance and Tuning with vm.swappiness


vm.swappiness is a tunable kernel parameter that controls how much the kernel favors swap over RAM. At the source code level, it’s also defined as the tendency to steal mapped memory. A high swappiness value means that the kernel will be more apt to unmap mapped pages. A low swappiness value means the opposite, the kernel will be less apt to unmap mapped pages. In other words, the higher the vm.swappiness value, the more the system will swap.
The default value I’ve seen on RHEL/CentOS/SLES is 60.
To find out what the default value is on a particular server, run:
[root@station1 Documents]# sysctl vm.swappiness
vm.swappiness = 60
The value is also located in /proc/sys/vm/swappiness.
[root@station1 Documents]# cat /proc/sys/vm/swappiness
60
 
Note: You can set the maximum value up to 100, the minimum is 0.

No comments:

Post a Comment