[rrd-users] multiple RRAs of same type

Alex van den Bogaerdt alex at ergens.op.het.net
Tue May 20 14:58:49 CEST 2008


On Mon, May 19, 2008 at 07:49:39AM +0100, Simon Hobson wrote:
> R Dicaire wrote:
> 
> >I'm having difficulty understanding the purpose of having multiple
> >RRAs of the same type, say AVERAGE, with different values.
> >example: RRA:AVERAGE:.5:1:288 RRA:AVERAGE:.5:60:4320 RRA:AVERAGE:.5:1440:365
> >Can someone explain what purpose this serves, and how they're utilized,
> 
> It allows you a simple tradeoff between storage space (and associated 
> processing time) vs length of history. Typically, you aren't too 
> bothered by knowing to the minute what your data did a whole year 
> ago, so an average over (say) 2 hour or 12 hour or 24 hour periods 
> will suffice. But for recent traffic you want as much detail as 
> possible.

It is also useful to have multiple RRAs spanning the same amount
of time but only in a different resolution ...

> Lets consider a case where your step size is one minute. That's 60 
> samples every hour, 1440 samples every day, and over half a million 
> samples every year. Not only would that take a fair bit of storage (I 
> have an rrd with 512 data series in it), but it would take quite a 
> bit of processing to reduce it down to a relatively low resolution 
> graph for the whole year.

... to overcome above argument.

E.g. RRA:AVERAGE:.5:1:525600 RRA:AVERAGE:.5:60:8760 RRA:AVERAGE:.5:1440:365

> There isn't actually anything to stop you keeping every one minute 
> value for a whole year if your application requires it - it would 
> allow you to 'drill down'* as I've seen done. RRD will handle it, 
> it'll just mean more storage and more processing required.

Now consider an application which allows you to 'drill down'.

It can start by showing an entire year worth of data, one day on
one pixel column. If available, RRDtool can take this data from
the RRA which stores 86400 seconds per CDP (1440 PDPs of 60 seconds
each).

Zoom in on the beginning of the year, and RRDtool may use the RRA
which stores 3600 seconds per CDP.  Zoom in again and RRDtool can
use the RRA storing 60 seconds per CDP.


If there's only one AVERAGE RRA available, the one with 60 seconds
per CDP, then RRDtool has no choice but to take 288 CDPs together,
doing so 365 times (one time for each pixel row). This takes time
and CPU resources.

Sometimes this is okay, if such a query is a very excercise.  But
if you expect many of such queries, it is best to have the data
ready when the user asks for it.



Multiple RRAs: RRDtool will have the data available when the user
needs it. This means a fast response, at the expense of more disk
space required and extra resources used each time an update occurs.

One RRA: RRDtool will have to consolidate the data at graph time,
meaning a slower response and a brief moment of high CPU and disk
resources used.  It does save disk space.



-- 
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/



More information about the rrd-users mailing list