vmstat cache占用很高

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
hellodba
帖子: 5
注册时间: 2012-06-05 0:19

vmstat cache占用很高

#1

帖子 hellodba » 2012-06-05 13:19

以下是系统系统配置几资源占用情况:
1、top:

hellodba@hellodba:~$ top

top - 13:10:58 up 52 min, 1 user, load average: 0.85, 1.11, 1.38
Tasks: 179 total, 1 running, 177 sleeping, 0 stopped, 1 zombie
Cpu(s): 0.5%us, 1.3%sy, 0.0%ni, 98.0%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 4048024k total, 3837740k used, 210284k free, 912564k buffers
Swap: 9761788k total, 152k used, 9761636k free, 2125288k cached

2、vmstat:

hellodba@hellodba:~$ vmstat 1
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 152 238804 913396 2129124 0 0 757 696 658 1298 12 9 71 9
1 0 152 238804 913404 2129120 0 0 0 20 297 514 1 2 95 2
0 0 152 238804 913404 2129124 0 0 0 0 556 1028 2 1 97 0
2 0 152 238804 913404 2129124 0 0 0 0 243 427 1 2 97 0
0 0 152 238804 913404 2129124 0 0 0 0 322 590 2 3 96 0

在google上看了下说cache是从硬盘中读取得缓存 但是用这么九了这写缓存不释放?
只能重启电脑才释放么 否则这内存一直占着 我是菜鸟 不懂的地方请各位指正 谢谢
头像
cuihao
帖子: 4793
注册时间: 2008-07-24 11:33
来自: 郑州
联系:

Re: vmstat cache占用很高

#2

帖子 cuihao » 2012-06-09 9:20

cache是加速用的,不是什么等待写入的数据:

代码: 全选

procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 5  0  52916 475664  60192 2080252    1   24   111   227  512  696 89  3  8  1
 7  0  52916 490652  60192 2080696    0    0     8     4  855  931 93  7  0  0
Linux内核认为有内存不用就是浪费。
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: vmstat cache占用很高

#3

帖子 自由建客 » 2012-06-09 9:32

那是读缓存,写缓存默认五秒刷新一次!
回复