SymptomsIf the server has a large amount of RAM available and disk operations are slow, it is possible to increase server performance by maximizing RAM usage instead of using SWAP.
Parallels Containers and Parallels Server Bare Metal intensively use SWAP, especially when the total RAM allocated for containers and virtual machines exceeds the amount of physical RAM available.
In such cases, disabling swap usage may lead to a performance degradation instead of a boost.
Decreasing SWAP usage will boost server performance only in cases when physical RAM is greater than the total amount of RAM allocated for containers and virtual machines.
ResolutionDecrease the vm.swappiness and vm.vfs_cache_pressure kernel parameters:
These values are approximate, so you may change them according to your needs. To make these parameters permanent, add the corresponding lines to /etc/sysctl.conf:
~# sysctl -w vm.swappiness=20
~# sysctl -w vm.vfs_cache_pressure=100
~# grep vm /etc/sysctl.conf
vm.swappiness = 20
vm.vfs_cache_pressure = 100
Additional InformationFor more information about virtual memory parameters, refer to Linux Kernel documentation:
VFS Shrinkage Tuning
Documentation for /proc/sys/vm/*