[rrd-users] Re: RRA explanation
Alex van den Bogaerdt
alex at ergens.op.het.net
Tue Jun 8 00:54:54 MEST 2004
On Mon, Jun 07, 2004 at 09:22:05PM +0200, Alan Craig wrote:
> One thing that has me really confused is the RRA function. Does somebody
> have a really good explanation on how this works to produce some good graphs
> or a link?
Think of RRAs as a sort of cache, but then preloaded.
When you create a graph, you need data to plot onto it. This data has to
come from a source, this would be an RRA.
So, why not have one RRA that spans two years with 5 minute data?
First of all: this would be 732 days times 24 hours times 12 intervals per
hour times the amount of datasources. For a standard setup with two DSes,
this would mean you'd have 421632 rates to store. This probably means you
have over 2.5 or even 3.3 megabytes of data. And this is for average only.
For each additional CF, the same amount has to be present. So, a standard
setup including min, max and average would be up to 10 MByte of data per RRD.
Then you decide to graph the two years. For simplicity assume the graph
will be 732 pixels wide. You will have to read and process this 10 MB.
RRDtool will have to take 24*12 rates, perform the appropriate calculation
on them (average, max, min, last) and put the result on the graph. Twice,
because you have two datasources, 732 times, because there are 732 pixels.
_If_ you have an RRA that stores data not only in this large RRA but also
in a smaller one with a larger time span per sample, RRDtool can simply
collect 1 rate and put them on the graph, times two, times 732. The
calculations have already be done. This saves time at graph time although
on the long term your computing power will be utilized more.
And if you decide you're not interested in a fine granularity two years
ago, thus you only want to see a day at a time, why keep the 5-minute
samples. Keep them for two days in stead of two years so you can save
OTOH if you're almost never will look at the whole two-year period on
one graph, IMHO there's little point in having an RRA with such a low
resolution. Let RRDtool calculate for a minute that once a year.
Do the same reasoning for the time intervals _you_ are interested in and
you will find the RRAs that match _your_ requirements.
> For example if I'm polling my router at 5min intervals and I would like to
> produce graphs showing:
> Detail in a 5min, 1hr, 1 Day, 1 Week, 1 Month, 1 Year.
You forget to tell how old this data is going to have to be. If you
want to graph in 5min detail one year ago, you will have to keep data
around for that time period. Dito for the other granularities. If you
don't want to, you don't have to.
If all what you have is a one-hour resolution, RRDtool has no way of
presenting 5-minute resolution. You cannot recover from this.
So you need to ask yourself the question: "Is RRDtool going to be able to
find the data I'm asking it to find". Next question: "Does calculating
every time I update outweigh speedy generation of the graph".
I ask you to respect any "Reply-To" and "Mail-Follow-Up" headers. If
you reply to me off-list, you'd better tell me you're doing so. If
you don't, and if I reply to the list, that's your problem, not mine.
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
More information about the rrd-users