centos释放缓存内存

为了使缓存里的数据不丢失,之前先运行一下以下命令

sync


# 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


posted @ 2013-03-05 17:07  rorshach  阅读(180)  评论(0编辑  收藏  举报