Re: kernel 2.6.1: erroneous statistics in /proc/diskstats?

From: Rick Lindsley
Date: Mon Jan 19 2004 - 06:02:37 EST


I would like to make sure /proc/diskstats is reliable or if I am totally
misunderstanding the significance of the milliseconds spent reading or
writing figures.

So far as I know, they are reliable but there always could be a bug.
Note that it is legitimate for field 8 to be greater than the time
elapsed, since it is the *total* time spent in *all* writes. If two write
requests were issued simultaneously and each fulfilled simultaneously,
taking exactly 10ms, you'd account for 20ms of "write I/O" even though
only 10ms of time has passed.

So, a few more details ...

How big was it?
How did you copy it (what command)?
Were you going through a file system or direct to disk?

One thing I notice is that your hdc shows 100+ "io's in progress" both
at start and completion. It may be as simple as that counter is off.
If there are IO's in progress when you start and they haven't finished
by the time you end, then they will certainly add about 6 seconds of
"write time" for each outstanding, apparently unfulfilled request.
This alone could account for your extra time. Any theories on why that
number is so large for hdc but quite small for hdb?

Rick
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/