- Plesk for Linux
Why swap is required on Plesk for Linux servers?
Linux OS itself requires swap, but not Plesk.
It is important to consider that Linux kernel uses swap space by copying chunks from RAM to swap space allowing processes to use more memory than available physically. By default, the swap is used even if there is enough free RAM on the system.
For example, the output of the command below shows "30" which means that when the RAM usage reaches 70%, the swap space can be used. A lower number will avoid swapping and make your system faster:
# cat /proc/sys/vm/swappiness
swappiness value can be changed:
Connect to the server using SSH.
Update the value temporarily:
# sysctl vm.swappiness=10
For the permanent change, edit the file
/etc/sysctl.confand add the parameter
# echo "vm.swappiness = 10" >> /etc/sysctl.conf