[rrd-users] What RRA does *rrdtool graph* use?

Simon Hobson linux at thehobsons.co.uk
Tue Mar 29 14:57:58 CEST 2011

Jaime Lozano wrote:

>I understand the examples but what RRA does rrdtool use? I mean, the line
>     DEF:myspeed=test.rrd:speed:AVERAGE
>specifies the Data Source but not the RRA; and in this case, we have two.

It will use the highest resolution data that "best" fills the graph.

Example 1. You have RRAs at 5min and 15 min resolutions. You graph a 
period from <something on the hour> to <something else on the hour>. 
If the 5 minute RRA will supply data for the whole period then it 
will be used (highest resolution), otherwise the 15 minute one will 
be used (assuming it goes back further.

Example 2.
You have RRAs at 2minute and 15 minute resolutions. You graph from 
<something on the hour> to <15 minutes past something>. In this case, 
the 15 minute RRA provides more data so will be used. The trick here 
would be to graph until 14 or 16 minutes past the hour so that the 2 
minute RRA will fill the graph.

The best way to select your start and end times is to always pick an 
end time that is an integer multiple of the consolidation period you 
want RRA Graph to use, and a start time that is <width> times the RRA 
consolidation period. In other words, make your graph an integer 
number of Consolidated Data Points (CDPs) wide, and have it start and 
end on a CDP boundary.

Eg something like this :
End=$Now - ( $Now mod $Step)
Start=$End - ( $Width * $Step )

Simon Hobson

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