- Plesk for Linux
Why does Plesk require SWAP memory?
It's important to consider that Linux kernel uses SWAP space by copying chunks from RAM >> SWAP space allowing processes to use more memory than the available physically. So, not Plesk, but Linux OS itself requires SWAP.
SWAP is a parameter that defines how much and ofter Linux kernel will copy RAM contents to SWAP ( this value goes from 0 to 100 ). By default, SWAP is used even if there is enough free RAM on the system.
# cat /proc/sys/vm/swappiness
This output shows "30" which means that when the RAM reaches 70% of RAM usage, will trigger the use of SWAP space. A lower number will avoid swapping and make your system faster.
Note: You can reduce this value using, for example, the value "10". This means the kernel will try to swap when RAM reaches 90% of capacity.
For the temporal change execute the following:
# sysctl vm.swappiness=10
- For the permanent change edit the file
/etc/sysctl.confand add the parameter
# cat /etc/sysctl.conf | grep vm.swappiness
vm.swappiness = 10
In order to monitor and have a picture of the RAM+SWAP usage it's always recommended to use the following Linux tools to monitor memory usage:
- top, htop
- swapon -s
- free -h