First of all I have to say the documentation for how to interpret
/proc data is really horrible!  I know it's gotten a lot better since
the days I first wrote collectl but there are still descriptions I
consider next to worthless and guess what - you picked one!  While I
can't remember the exact hoops I jumped through trying to figure this
out, I ultimately looked at how iostat did it, assuming (always
dangerous) that's it's been around for so long if there were any
problems with its calculations someone would have picked up on it by
now.

In general I do tend to compare collectl's numbers with those of other
tools since the data really is sourced the same way and so all these
tools really should match.  In fact, my quelen numbers do indeed
match,  There are a few cases where output may differ but this is not
one and I like to think when they do, collectl is correct.  ;)

That said, getting back to your question, the key is field 11 of
/proc/diskstats which is described as the 'weighted # of msec doing
IOs".  Now aren't you glad you asked?  I'm not really sure what is
weighted, but looking at my code I see I'm doing the following:

$dskQueLen[$dskIndex]=$dskWeighted[$dskIndex]/$microInterval*$HZ/1000;

for each disk.  $HZ tells me what the clock frequency is in hundredths
of a second (at least I think it's in hundredths), which is almost
always 100 and $microInterval is the time since the last sample.
Therefore this code is taking the weighted average and diving by its
value for this interval and then dividing that by 10.  That tells me
the result is in hundredths and by dividing by 10 it's being converted
to msec.  Probably not too useful without a good definition of what
'weighted' means, but I'd guess it's the average queue depth over time
and by dividing by the interval we're getting the average queue
length.  I've also been told this can be explained by Little's Law -
http://en.wikipedia.org/wiki/Little's_law

does this help at all?

-mark

On Wed, Jul 27, 2011 at 8:45 AM, Matt Weil <[email protected]> wrote:
> All,
>
> How or where is this information being calculated?
>
> QLen    Average number of requests queued
>
> Thanks
>
> Matt
>
> ------------------------------------------------------------------------------
> Got Input?   Slashdot Needs You.
> Take our quick survey online.  Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Collectl-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/collectl-interest
>

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Collectl-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/collectl-interest

Reply via email to