首页 > Linux操作系统 > Linux操作系统 > 清理linux cache
[root@testlfy ~]# sync
[root@testlfy ~]# free -m
total used free shared buffers cached
Mem: 24161 23602 559 0 343 18430
-/+ buffers/cache: 4828 19333
Swap: 10239 0 10239
[root@testlfy ~]# echo 3 > /proc/sys/vm/drop_caches
[root@testlfy ~]# free -m
total used free shared buffers cached
Mem: 24161 4820 19341 0 0 680
-/+ buffers/cache: 4138 20023
Swap: 10239 0 10239
To free pagecache, use
echo 1 > /proc/sys/vm/drop_caches;
to free dentries and inodes, use
echo 2 > /proc/sys/vm/drop_caches;
to free pagecache, dentries and inodes, use
echo 3 >/proc/sys/vm/drop_caches
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/720091/viewspace-1071313/ ,如需转载,请注明出处,否则将追究法律责任。