How To Solve Swappiness (Apache) Problem

Swappiness is a Linux kernel parameter that controls the relative weight given to swapping out runtime memory, as opposed to dropping pages from the system page cache. Swappiness can be set to values between 0 and 100 inclusive. A low value causes the kernel to avoid swapping, a higher value causes the kernel to try to use swap space. The default value is 60, and for most desktop systems, setting it to 100 may affect the overall performance, whereas setting it lower (even 0) may decrease response latency

sysctl -w vm.swappiness=0

or

sudo vi /etc/sysctl.conf

vm.swappiness=0

For More on Apache Tuning

Clear Swap

sudo swapoff -a
sudo swapon -a

You may also like...