How to optimize the use of RAM ?
Since sysadmin are looking to have racing beast servers, they are confonted to the problem of performance optimization. Nowadays it is not uncommon to see a server with 32G or 96G of RAM or even more. Why to mount so much in memory? Well it is the use that imposes it: Virtualization Video editing HD compression Heavy applicative consumption like clustering or high availability architectures etc In this blog we will speek about swapiness which is a kernel module that defines when linux has to start to write in the SWAP (an allocated space in the disk) to relieve the RAM. It may seem obvious that with access times in milliseconds for Hard Disk and in nanoseconds for RAM, it is better to write in the RAM. Recap: vm.swappiness = 0 : Swapping will be activated urgently only to avoid out of memory condition. vm.swappiness = 60 : This is the default value and means that from 40% of Ram occupancy, the kernel writes to the swap. vm.swappiness = 10 : This what is recommended to improve performance. vm.swappiness = 100 : The kernel will swap aggressively. To see your swappiness setting : cat /proc/sys/vm/swappiness 60 Let’s consider that we have a server having 32G of RAM. fixing the swappiness to 5 is enough since kernel will use swap only when the free RAM space is less or equal...
Read More