清理系统缓存
当服务器内存使用率高达90%以上时,且有较大耗内存操作时,可以考虑把系统的垃圾内存清理掉。方法如下
linux23:~ # echo 3 > /proc/sys/vm/drop_caches
linux23:~ # free -m
total used free shared buffers cached
Mem: 32224 32137 86 0 64 27310
-/+ buffers/cache: 4762 27462
Swap: 34815 1506 33309
linux23:~ # echo 3 > /proc/sys/vm/drop_caches
linux23:~ # free -m
total used free shared buffers cached
Mem: 32224 14698 17526 0 3 9927
-/+ buffers/cache: 4768 27456
Swap: 34815 1506 33309
linux23:~ #
当服务器内存使用率高达90%以上时,且有较大耗内存操作时,可以考虑把系统的垃圾内存清理掉。方法如下
linux23:~ # echo 3 > /proc/sys/vm/drop_caches
linux23:~ # free -m
total used free shared buffers cached
Mem: 32224 32137 86 0 64 27310
-/+ buffers/cache: 4762 27462
Swap: 34815 1506 33309
linux23:~ # echo 3 > /proc/sys/vm/drop_caches
linux23:~ # free -m
total used free shared buffers cached
Mem: 32224 14698 17526 0 3 9927
-/+ buffers/cache: 4768 27456
Swap: 34815 1506 33309
linux23:~ #
当服务器内存使用率高时,可以使用`echo 3 > /proc/sys/vm/drop_caches`命令清理系统缓存,释放内存。操作前后内存使用情况对比显示了该方法的有效性。
3617

被折叠的 条评论
为什么被折叠?



