[rrd-users] HELP I dont understand RRA's

Simon Hobson linux at thehobsons.co.uk
Mon Jan 25 13:21:54 CET 2010


tony at specialistdevelopment.com wrote:

>Im really sorry to ask this as im probably being very stupid...Im new 
>to RRD tool

Yes, it can be a bit intimidating to start with.

>I have followed tutorials, examples etc, but to finally get my head 
>around it im trying to do it on my own, but i come unstuck, when it 
>comes to RRA's in the RRD creation.
>
>Can anyone explain in really, really simple terms what they are?

Have you read this one ?
http://www.vandenbogaerdt.nl/rrdtool/tutorial/rrdcreate.php

Anyway, in short, there are two things you need to define in an RRD database :

1) A DS for each source of data
2) An RRA function for each combination of resolution, timescale, and 
aggregation function required.

You cannot graph a DS directly, only an RRA aggregate of it. Each RRA 
specifies :
How many primary data points (PDP) to aggregate into a consolidated 
data point (CDP).
How many consolidated data points to keep.
What aggregation function to use.

So lets take an example. I collect data with a 5 minute (300s) step 
time. So that means my PDPs are at 00:05, 00:10, 00:15, and so on. 
This isn't really that useful if I only want a monthly overview. I 
might for example, consolidate 24 PDPs into a CDP - that gives me 2 
hours/CDP. If I now plot a graph that is 273 pixels wide, I will get 
one pixel per CDP and the graphing process needs few resources to run 
as the data is already at the right resolution.

However, for a more detailed graph of the data over the last day, I 
would probably want to keep a consolidation with only 1 PDP per CDP. 
Thus I'd get 288 CDPs per day and could plot a graph 288 pixels wide 
to cover one day in detail.

Neither of the above could **NOT** be done by simply keeping every 5 
minute sample - but lets consider longer periods. If I want to be 
able to graph data over a year, then I'd need to keep over 100k 5 
minute samples. That requires a lot of storage, and a lot of 
processing every time you want to draw a graph. Since in most cases 
we aren't interested in the fine detail from a year ago, we can 
define multiple RRAs to suit. For example, I keep 5 minute samples 
for 2 days, 30 minute consolidated data for 2 weeks, 2 hours 
consolidated data for 2 months, and  24hour consolidated data for 2 
years.

Once you've defined the level of detail and length of time for each 
RRA, then RRD tool takes care of updating each one as required. Thus 
storage and processing requirements for graphing are kept to 
reasonable levels.


The last element is what type of aggregation function to use. You may 
want to keep multiple RRAs - a typical case might be to keep both an 
average and maximum. For things like data traffic, for sizing links 
etc you need to know maximums, but for assessing how much overall 
traffic you are using, you need to keep averages.

Imagine a situation where a service uses 24mbps for one hour during a 
day. You need to know that 24mbps has been used so that you know the 
link needs to cope with 24mbps - so you need a maximum RRA to capture 
that.
On the other hand, if you are looking at volumes of traffic (perhaps 
you are billing a customer for data transferred to/from a server), 
then you'd want to keep the average (1mbps over a 24 hour period). 
Again, your options are to store consolidated data (ie average over 
each day - 1mbps * 24hr), or you can store all the detailed data and 
work it out later (ie 24mbps * 1hr plus 0mbps * 23hr).


-- 
Simon Hobson

WANTED: "Software CD ROM Kit" for Canon CLBP 360-PS printer (Canon 
part no RH6-3612, or possibly RH6-3810, or RH6-3610 might do). I've a 
dead HD and need this CD so I can replace the disk and re-install the 
printer OS on it. If anyone knows where I might get hold of one I'd 
be grateful - requests to Canon drew a blank, it's been out of 
support for years.
Alternatively, if anyone has one of these and would let me image 
their hard disk ...

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the rrd-users mailing list