清理linux缓存

来源:互联网 发布:java毫秒数转换成时间 编辑:程序博客网 时间:2024/04/25 10:22

命令是:
echo 1 > /proc/sys/vm/drop_caches
当然,一般来说是不需要这么操作的。

在我的128Mvps上试了下:

[root@localhost /]# free -m
             total       used       free     shared    buffers     cached命令是:
echo 1 > /proc/sys/vm/drop_caches
当然,一般来说是不需要这么操作的。

在我的128Mvps上试了下:

[root@localhost /]# free -m
             total       used       free     shared    buffers     cached
Mem:           128        125          2          0          2         86
-/+ buffers/cache:         36         91
Swap:          255          0        255
[root@localhost /]# echo 1 > /proc/sys/vm/drop_caches
[root@localhost /]# free -m
             total       used       free     shared    buffers     cached
Mem:           128         47         80          0          0         11
-/+ buffers/cache:         35         92
Swap:          255          0        255

Mem:           128        125          2          0          2         86
-/+ buffers/cache:         36         91
Swap:          255          0        255
[root@localhost /]# echo 1 > /proc/sys/vm/drop_caches
[root@localhost /]# free -m
             total       used       free     shared    buffers     cached
Mem:           128         47         80          0          0         11
-/+ buffers/cache:         35         92
Swap:          255          0        255

原创粉丝点击