High-level Design and Best PracticesPDF version

Swapiness parameter configuration

The kernel parameter that determines the tendency of the kernel to swap pages in and out of the main memory is vm.swappiness. By default, on RHEL 7 and variants, the value is set to 60 (range 0-99). This is not appropriate for Hadoop clusters. This needs to be tuned down to 1 to avoid unnecessary page outs and long garbage collection pauses.

Run the following command to set the vm.swapiness parameter to 1:
sudo sysctl -w vm.swappiness=1
To make the vm.swapiness parameter persist across reboots, add an entry in the /etc/sysctl.conf file as follows:
vm.swappiness=1