##问题如下:
[root@server~]# free -g
total used free shared buffers cached
Mem: 125 85 40 0 0 0
-/+ buffers/cache: 84 41
Swap: 3 3 0
##解决: /etc/sysctl.conf 中添加
vm.swappiness=10
使配置生效
sysctl -p
关闭并开启swap使生效
swapoff -a
swapon -a
###参考: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/s-memory-tunables.html http://askubuntu.com/questions/1357/how-to-empty-swap-if-there-is-free-ram