Chinaunix首页 | 论坛 | 博客
  • 博客访问: 173629
  • 博文数量: 108
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 1065
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-29 08:56
文章分类

全部博文(108)

文章存档

2011年(11)

2010年(46)

2009年(29)

2008年(22)

我的朋友

分类: LINUX

2008-11-07 23:35:07

由于系统缓存 free 察看效果不好,可采用:

ps -p pid -o rss,sz,vsize


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

This tunable was added in 2.6.16.

阅读(587) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~