- 论坛徽章:
- 33
|
回复 6# earth2mars
这个命令只是把所有的buff写入文件, 不会清除 cache. 这样做的目的, 是防止在清除cache的时候把buffer也清除了, 导致数据丢失或不一致.
下面是 官方的 说明. http://www.kernel.org/doc/Documentation/sysctl/vm.txt
==============================================================
drop_caches
Writing to this will cause the kernel to drop clean caches, dentries and
inodes from memory, causing that memory to become free.
To free pagecache:
echo 1 > /proc/sys/vm/drop_caches
To free dentries and inodes:
echo 2 > /proc/sys/vm/drop_caches
To free pagecache, dentries and inodes:
echo 3 > /proc/sys/vm/drop_caches
As this is a non-destructive operation and dirty objects are not freeable, the
user should run `sync' first.
==============================================================
小心使用.
|
|