[rrd-users] Re: Question on 95th percentile

Paul Wickman paulw at explosive.net
Wed Feb 28 06:29:36 MET 2001



Take a look at the Statistics::Descriptive perl module.  I use it in a
bandwidth billing application developed for a recent client who runs a
mid-sized co-location facility.  It uses Cricket's collector (with a
heavily modified config tree) to retrive HCInOctets/HCOutOctets for each
customer's port(s) on the switches (Foundry NetIron400).  Any collector
errors are reported to a Mon server running on the same box.

I decided that Cricket's default RRD archive definitions, while useful for
general bandwidth measurement, debugging purposes, etc., were not
granular/detailed enough to be used as data for billing.  I redefined the
archives as such:

14400 rows * 300 second step = 5 minutes AVG samples for 50 days 
  288 rows * 300 second step = 1 day AVG samples for 600 days

This does make the RRD file larger, about ~121 Kbytes per datasource, but
disk is cheap and bandwidth is money :^)  

The billing folks can then enter a specific date via a CGI form, and
RRD::fetch is used to retrive '<date_entered> - 30 days' worth of (5
minutes) samples.  Each sample (HCInOctets + HCOutOctets) is fed into
$stat->add_data(), and then the $stat->percentile(95) method of
Statistics::Descriptive is called which, you guessed it, calculates the
95th percentile.  For any missing samples, we error on the side of the
customer by adding a zero, which effectively says that the customer didn't
use any bandwidth during that sample.  Presumably, samples would only be
missed if there was a problem with the infrastructure, in which case the
customer should not be penalized.

---
	We listen, and if it feels good, we shake...
	
					- Pilgrims, by Widespread Panic


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list