Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1127966
  • 博文数量: 113
  • 博客积分: 2422
  • 博客等级: 大尉
  • 技术积分: 1393
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-25 17:54
文章分类
文章存档

2016年(1)

2014年(8)

2013年(7)

2012年(13)

2011年(42)

2010年(26)

2009年(6)

2008年(6)

2007年(4)

我的朋友

分类: LINUX

2011-02-21 11:52:43

释放linux cached使用内存的方法

free-up-cache-memory-in-linux

# free
             total       used       free     shared    buffers     cached
Mem:       4037464    3953104      84360          0     169812    2696660
-/+ buffers/cache:    1086632    2950832
Swap:      6094840         96    6094744
#

Free the cache memory by issuing this command

sync ; echo 3 > /proc/sys/vm/drop_caches

then checked as below :

# free
             total       used       free     shared    buffers     cached
Mem:       4037464     983772    3053692          0       2488      36728
-/+ buffers/cache:     944556    3092908
Swap:      6094840         96    6094744


备注:

# /proc/sys/vm/drop_caches (since Linux 2.6.16)

#   To free pagecache, use echo 1 > /proc/sys/vm/drop_caches
#   To free dentries and inodes, use echo 2 > /proc/sys/vm/drop_caches
#   To free pagecache, dentries and inodes, use echo 3 > /proc/sys/vm/drop_caches


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

chinaunix网友2011-03-06 16:49:02

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com