码迷,mamicode.com
首页 > 其他好文 > 详细

服务器缓存占用的处理方法

时间:2014-08-21 19:43:35      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:服务器缓存备占用

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 notfreeable, the user should run "sync" first in order to make sure allcached objects are freed.

This tunable was added in 2.6.16.


本文出自 “zhanguo1110” 博客,请务必保留此出处http://zhanguo1110.blog.51cto.com/5750817/1543129

服务器缓存占用的处理方法,布布扣,bubuko.com

服务器缓存占用的处理方法

标签:服务器缓存备占用

原文地址:http://zhanguo1110.blog.51cto.com/5750817/1543129

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!