Linux清理cached缓存
运行sync将dirty的内容写回硬盘$sync通过修改proc系统的drop_caches清理free的cacheroot@xxx:~# syncroot@xxx:~# free -m total used free shared buffers cachedMem: 2002
·
运行sync将dirty的内容写回硬盘
$sync
通过修改proc系统的drop_caches清理free的cache
root@xxx:~# sync
root@xxx:~# free -mtotal used free shared buffers cached
Mem: 2002 1882 119 0 90 1516
-/+ buffers/cache: 275 1727
Swap: 0 0 0
root@xxx:~# echo 3 > /proc/sys/vm/drop_caches
root@xxx:~# cat /proc/sys/vm/drop_caches
3
root@xxx:~# free -m
total used free shared buffers cached
Mem: 2002 227 1774 0 1 23
-/+ buffers/cache: 202 1799
Swap: 0 0 0
更多推荐
已为社区贡献2条内容
所有评论(0)