zhaog / aspersa

Automatically exported from code.google.com/p/aspersa
0 stars 0 forks source link

diskstats reporting wrong amount of writes/second #137

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

The problem I have is that I get different results when looking at iostat and 
diskstats (5 second intervals):

Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz 
avgqu-sz   await  svctm  %util
sdc          0.00 277.56 104.01 415.83  936.27 5574.35   468.14  2787.17    
12.52     6.34   12.18   1.24  64.57

#ts device    rd_s rd_avkb rd_mb_s rd_mrg rd_cnc   rd_rt    wr_s wr_avkb 
wr_mb_s wr_mrg wr_cnc   wr_rt busy in_prg
 {1} sdc1     133.2    10.1     0.7     0%    0.9     6.6   841.5    13.9     5.7    42%   12.3    14.7  87%      0
 {1} sdc1     154.8     7.9     0.6     0%    0.7     4.3   590.4     9.1     2.6    12%    9.1    15.4  71%      0

The amount of writes/s that iostat is measuring is about 5600 while diskstats 
only mentions 600.
/proc/diskstats tells me iostat is correct

raw diskstats output:
TS 1301045501.005860000 2011-03-25 05:31:41
  8   33 sdc1 1572537676 2369344 3687151364 1575056414 2541895139 1708184481 3991989096 121136333 1 982122453 1798311795
TS 1301045506.010994000 2011-03-25 05:31:46
  8   33 sdc1 1572538262 2369344 3687156316 1575060551 2541899787 1708186654 3992043720 121207970 4 982126782 1798388127
TS 1301045511.016149000 2011-03-25 05:31:51
  8   33 sdc1 1572538898 2369344 3687161404 1575064096 2541903848 1708186950 3992078608 121272417 1 982130754 1798455962
TS 1301045516.021280000 2011-03-25 05:31:56

Original issue reported on code.google.com by kenny.g...@percona.com on 25 Mar 2011 at 12:51