Device Mapper stats wrong
I've just been looking into a support question for collectl in which someone was pointing out some inconsistencies with dm disks and the disks they're made up from. The bottom line is that /proc/diskstats appears to be wrong and I say this for 2 reasons. I know collectl is correctly reporting the data and I also confirmed that iostat reports the same numbers as collectl.
Consider the following data snapshot while writing a large file to /tmp (and sorry about the formatting but I can't figure out how to make this show up in courier font unless of course it just doesn't do that in preview-post mode):
### RECORD 28 >>> poker <<< (1237222938.002) (Mon Mar 16 13:02:18 2009) ###
# DISK STATISTICS (/sec)
# <---------reads---------><---------writes---------><--------averages--------> Pct
#Name KBytes Merged IOs Size KBytes Merged IOs Size RWSize QLen Wait SvcTim Util
sda 0 0 0 0 38912 8000 76 512 512 144 1882 13 100
sdb 0 0 0 0 0 0 0 0 0 0 0 0 0
dm-0 0 0 0 0 32256 0 8064 4 4 18415 2270 0 100
dm-1 0 0 0 0 0 0 0 0 0 0 0 0 0
hda 0 0 0 0 0 0 0 0 0 0 0 0 0
All you really need to see in this snapshot is that sda wrote almost 39MB and dm-0 only reported about 32M. If anything I'd expect the dm numbers to be at least as big as any one disk, But what's more disturbing is the queue length of 18K is clearly bogus.
So I guess the question is should I trust any dm numbers? Doesn't feel like I should.
-mark
|