首页 > Software > 清磁盘缓存的方法(WinNT & Linux)

清磁盘缓存的方法(WinNT & Linux)

2010年3月11日 Galaxy 发表评论 阅读评论

其实Galaxy几年前就在用了,后来Linux机毕业移交root,Win机运回老家,就一直荒废掉了。

简单的说,都是sync,Linux下是自带,Win下要去微软下那个Sysinternals工具。
(当然,你得有root权限才行。

用途?
你要有米配UPS,那不用也罢。
记得有阵子驱动不好某板卡老无规律死机来着。

Linux下:
http://www.linuxinsight.com/proc_sys_vm_drop_caches.html

drop_caches
Submitted by admin on Wed, 2006-05-31 16:12

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 in order to make sure all cached objects are freed.

This tunable was added in 2.6.16.

Win下(限NT内核):
SysinternalsSuite 中的sync.exe

Tags: , , ,

Related posts

分类: Software 标签: , , , 157 views
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.

Locations of visitors to this page