[httperf] Statistics

Martin Arlitt arlitt at granite.hpl.hp.com
Mon Jan 29 12:42:54 PST 2007


hi Chris

> Just got this output from httperf:
>
>    Connection time [ms]: min 4.3 avg 4.4 max 4.4 median 4.5 stddev 0.0
>
> How can the median be higher than the maximum?

as you know the true median cannot be higher than the maximum.  however,
httperf trades off a small amount of accuracy in order to reduce the
memory required.  instead of keeping a list of all the connection times,
it keeps a histogram; the median value that is reported is the middle of
the bin that contains the median value.  for example, if the bin held
all observed values from 4 to 5 ms, then the reported median would be
4.5ms, no matter where the observed values fell within the bin.  in your
case all of the observed values happened to fall in the lower half of the
bin, which is why the error between the true median and reported median
was obvious.

if you need more precision, you can decrease the BIN_WIDTH value in
stat/basic.c.  you may also want to adjust the MAX_LIFETIME value, if many
of the observed connection lifetimes are above the default value.  if you
adjust the precision, you may also need to adjust the number of
significant digits that get printed; to do this you'll need to search for
the appropriate statements in stat/basic.c (less straightforward than
changing the BIN_WIDTH value).

thanks

Martin


More information about the httperf mailing list