[rrd-users] multiple RRAs of same type

Alex van den Bogaerdt alex at ergens.op.het.net
Tue May 20 15:17:46 CEST 2008


On Mon, May 19, 2008 at 12:46:26PM -0400, R Dicaire wrote:

> > Taking the examples you've given above :
> > RRA:AVERAGE:.5:1:288
> > Gives you one minute values for 288 minutes (4.8 hours)
> 
> I see....if the rrd is updated every 5 min, wouldn't that make one
> minute values pointless, or inaccurate?

No, not necessarily.

Consider updates to occur exactly four minutes past the hour.

If you have stepsize 300 (5 minutes) then RRDtool will have to normalize
data to fit into a 5-minute slot.

If you have stepsize 60 (1 minute) then RRDtool will not have to normalize
this data.

Especially for MAX and MIN, this means having a smaller step size is
*more* accurate, not *less*.

In fact, you can have step size 1, and an RRA with 60 (or even 300)
PDPs per CDP as RRA with the best resolution.

Try to figure out how normalization and consolidation work (my site
may help).

Create two RRDs:

Both having MIN, AVERAGE and MAX RRAs.
Both spanning the same amount of time (this may be short for this
excercise).
One RRD has step size 1, and stores 60 PDP per CDP
One RRD has step size 60, and stores 1 PDP per CDP
Both have a high enough heartbeat.

Now update both databases with the same timestamp and rate, and you
should spot a difference unless you happen to update with timestamps
which are a whole multiple of 60.

---------------------------------------------------------------------------
rrdtool create test1.rrd --start 1211234400 \
        --step  1 \
        DS:x:GAUGE:600:U:U \
        RRA:MIN:0:60:5          \
        RRA:AVERAGE:0:60:5      \
        RRA:MAX:0:60:5
rrdtool create test2.rrd --start 1211234400 \
        --step 60 \
        DS:y:GAUGE:600:U:U \
        RRA:MIN:0:1:5           \
        RRA:AVERAGE:0:1:5       \
        RRA:MAX:0:1:5

rrdtool update test1.rrd 1211234460:0
rrdtool update test2.rrd 1211234460:0

rrdtool update test1.rrd 1211234519:100
rrdtool update test2.rrd 1211234519:100

rrdtool update test1.rrd 1211234580:50
rrdtool update test2.rrd 1211234580:50

echo
echo Showing MIN rates
rrdtool fetch test1.rrd MIN --start 1211234400 --end 1211234580
rrdtool fetch test2.rrd MIN --start 1211234400 --end 1211234580

echo
echo Showing AVERAGE rates
rrdtool fetch test1.rrd AVERAGE --start 1211234400 --end 1211234580
rrdtool fetch test2.rrd AVERAGE --start 1211234400 --end 1211234580

echo
echo Showing MAX rates
rrdtool fetch test1.rrd MAX --start 1211234400 --end 1211234580
rrdtool fetch test2.rrd MAX --start 1211234400 --end 1211234580
---------------------------------------------------------------------------

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



More information about the rrd-users mailing list