swappiness
60
。Warning
swappiness=0
more aggressively avoids swapping out, which increases the risk of OOM killing under strong memory and I/O pressure.swappiness
value is recommended for database workloads. For example, for Oracle databases, Red Hat recommends a swappiness
value of 10
.min_free_kbytes
可破坏您系统的极限值
min_free_kbytes
太低可防止系统重新利用内存。这可导致系统挂起并让 OOM 杀死多个进程。min_free_kbytes
值的结果是在该系统中花费太多时间重新利用内存。dirty_ratio
20
。dirty_background_ratio
10
。drop_caches
1
、2
或者 3
让内核放弃各种页缓存和 slab 缓存的各种组合。sync
命令。重要
drop_caches
释放内存。swappiness
临时设定为 50
,请运行:# echo 50 > /proc/sys/vm/swappiness
sysctl
命令。有关详情请参考《部署指南》,网址为http://access.redhat.com/site/documentation/Red_Hat_Enterprise_Linux/。