Wednesday 11 March 2015

Monitoring team is getting alerts saying SWAP memory reached the threshold level even 16GB free memory is available on the host ,it is taking more memory from swap memory.

we have coordinated with unix team in setting host level parameters like swappiness value in /etc/sysctl.conf file to use 30 percent of swap memory to use and 70 percent from main memory.

various solutions

 The swap file will then only be used when my RAM usage is around 80 or 90 percent. To change the system swappiness value, open/etc/sysctl.conf as root. Then, change or add this line to the file:

vm.swappiness = 10

Reboot for the change to take effect

$ cat /proc/sys/vm/swappiness

60

meaning that the swap file will be used fairly often if the memory usage is around half of my RAM. You can check your own system's swappiness value by running:the above require reboot. to avoid reboot use below command 

You can also change the value while your system is still running using below

sysctl vm.swappiness=10


No comments:

Post a Comment