ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 清理linux cache

清理linux cache

原创 Linux操作系统 作者:csbin 时间:2014-01-16 09:47:48 0 删除 编辑

[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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-01-12

  • 博文量
    69
  • 访问量
    1479817