Linux常用技巧系列: Centos 7 / Ubuntu 清空内存缓存

检查内存占用清空,free -m

[root@localhost tiger]# free -m

              total        used        free      shared  buff/cache   available

Mem:         128507        1896       99162          11       27448      125776

Swap:          4095          46        4049

可以看到2.7G缓存,

清空内存中的缓存命令如下:

[root@localhost]# sync
[root@localhost]echo 3 > /proc/sys/vm/drop_caches

清空后,可以看到缓存很少了。

[root@localhost tiger]# free -m

              total        used        free      shared  buff/cache   available

Mem:         128507        1649      126492          11         365      126215

Swap:          4095          46        4049

(阅读时间5S)

猜你喜欢

转载自blog.csdn.net/dongfangxiaozi_/article/details/89073828
今日推荐