美文网首页
linux 清空 cache

linux 清空 cache

作者: 偷油考拉 | 来源:发表于2021-09-03 16:18 被阅读0次
[root@prod-proxy ~]# free
              total        used        free      shared  buff/cache   available
Mem:        3882068     3148744      222520       92480      510804      400132
Swap:       4063228      268488     3794740

[root@prod-proxy ~]# cat /proc/meminfo 
...
Buffers:               0 kB
Cached:           461884 kB
...

[root@prod-proxy ~]# smem -tw
Area                           Used      Cache   Noncache 
firmware/hardware                 0          0          0 
kernel image                      0          0          0 
kernel dynamic memory       3075112     430132    2644980 
userspace memory             557908      38304     519604 
free memory                  249048     249048          0 
----------------------------------------------------------
                            3882068     717484    3164584 
[root@prod-proxy ~]# sync
[root@prod-proxy ~]# echo 3 > /proc/sys/vm/drop_caches 

[root@prod-proxy ~]# free
              total        used        free      shared  buff/cache   available
Mem:        3882068     3139948      580860       92480      161260      483700
Swap:       4063228      268488     3794740

[root@prod-proxy ~]# cat /proc/meminfo 
...
Buffers:               0 kB
Cached:           127020 kB

[root@prod-proxy ~]# smem -tw
Area                           Used      Cache   Noncache 
firmware/hardware                 0          0          0 
kernel image                      0          0          0 
kernel dynamic memory       2746408     105620    2640788 
userspace memory             565900      39220     526680 
free memory                  569760     569760          0 
----------------------------------------------------------
                            3882068     714600    3167468 

...

相关文章

网友评论

      本文标题:linux 清空 cache

      本文链接:https://www.haomeiwen.com/subject/xucciltx.html