Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2299121
  • 博文数量: 276
  • 博客积分: 5998
  • 博客等级: 大校
  • 技术积分: 5175
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-24 14:43
文章分类

全部博文(276)

文章存档

2014年(25)

2013年(11)

2012年(69)

2011年(167)

2010年(4)

分类: LINUX

2011-07-15 07:04:28

sync;sync;sync;echo 3 > /proc/sys/vm/drop_caches
 
sync命令不要和后面的echo 3 。。。命令分开写,并且最好不要使用上面的命令linux内核有自己的一套内存处理机制。
 
 

 
相比与其他操作系统把一部分内存作为磁盘缓存,linux系统默认情况下虚拟内存管理器(VMM)会把所有的可用的内存空间作为磁盘缓存,所以有可能几G的内存只剩几十M。我们不能单单从内存使用率判断有内存瓶颈。
 

 
 
[root@buyer05 ~]# free
             total       used       free     shared    buffers     cached
Mem:       8162580    8117224      45356          0     312744     486164
-/+ buffers/cache:    7318316     844264
Swap:      8193140     346984    7846156

 
-buffers/cache 的内存数:used - buffers - cached
+buffers/cache 的内存数:free + buffers + cached
 
-/+ buffers/cache:    7318316     844264后面的数值是可用的内存。
 
 
参考
 
 
 
 
书:Tuning Red Hat Enterprise Linux on IBM Eserver
xSeries Servers
阅读(1976) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~