[rrd-users] Usual RRD question on AVERGAE, MAX and consolidation :)

Simon Hobson linux at thehobsons.co.uk
Thu Dec 19 17:59:47 CET 2013


James Bensley wrote:
>Many thanks for the reply. Does RRD draw graphs as one CDP per pixel?
>As a simple example; to produce a month graph taking samples every 300
>seconds (5 minutes) I would need a graph 8640 pixels wide; 30 (days in
>a month, or 31) * 24 (hours in a day) * 12 (5 minute samples in one
>hour) = 8640, is that logic correct?
>
>If I am producing graphs say 864 pixels wide then we are consolidating
>10 CDPs into each pixel, in this instance when using
>DEF:ds0=my.rrd:ds0:MAX we choose the highest of the 10 samples to be
>used in that one pixel?

You are correct. If the graph doesn't have enough pixels then it will consolidate the data as instructed.


>I am graphing with RRD for billing customers based on traffic usage so
>I want this value to be as high as possible (without being higher than
>what they actually used), otherwise I am under-billing.

What are you selling them ?
If you are selling by bits transferred then maximum is absolutely the wrong value to use as it will very significantly overcharge. Average * time will give the actual qualtity of data transferred regardless of consolidation - as long as you consolidate with the average function. IIRC the total function will do this for you.

I do a fair bit of traffic graphing at work, the difference between average and max is usually very large once consolidated. It depends heavily ontraffic, but it's not hard to see patterns where the difference can be a factor of 5 or 10 or more ! At one extreme we host websites with traffic that while it varies during the day, has a modest peak-average ratio. At the other extreme, we have customers who run nightly backups but otherwise don't use the link much - they have a very high peak-average value (if you only use the link for (say) 1/2 hour, then the daily average is only 1/48th of the average for that 1/2 hour.

On the other hand, if you are billing them by peak throughput then max would be the way to go. However I've never seen or heard of anyone billing like that. Normally, if you charge according to max rate then you traffic manage the data so that the rate purchases cannot be exceeded. I currently look after sites with 10 abd 20mbps connections - both carried on 100mbps bearers which means the actual limit is imposed by traffic management functions in the routers. In the past I've been involved with frame relay networks where we specified (and paid for) 2different quantities - the size of the bearer and the committed (ie guaranteed) rate - and the burst rate was generally imposed by the network provider (they placed limits on the bearer/sum of committed rates values).



More information about the rrd-users mailing list