分页: 1 / 1

vmstat cache占用很高

发表于 : 2012-06-05 13:19
hellodba
以下是系统系统配置几资源占用情况:
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是从硬盘中读取得缓存 但是用这么九了这写缓存不释放?
只能重启电脑才释放么 否则这内存一直占着 我是菜鸟 不懂的地方请各位指正 谢谢

Re: vmstat cache占用很高

发表于 : 2012-06-09 9:20
cuihao
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内核认为有内存不用就是浪费。

Re: vmstat cache占用很高

发表于 : 2012-06-09 9:32
自由建客
那是读缓存,写缓存默认五秒刷新一次!