echo "vm.swappiness = 10" >> /etc/sysctl.conf
sudo sysctl vm.swappiness=10
war 30
echo "vm.vfs_cache_pressure=50" >> /etc/sysctl.conf
sudo sysctl vm.vfs_cache_pressure=50
war 100
cd /var/
touch swap.img
chmod 600 swap.img
dd if=/dev/zero of=/var/swap.img bs=4096k count=4000
mkswap /var/swap.img
swapon /var/swap.img
echo "/var/swap.img none swap sw 0 0" >> /etc/fstab
swapoff /var/swap.img
swapon -p 100 /var/swap.img
swapoff /dev/mapper/centos-swap
swapon -p 10 /dev/mapper/centos-swap