[rrd-users] Re: Data differ from RRA to RRA - normal?

Alex van den Bogaerdt alex at ergens.op.het.net
Thu Oct 12 14:36:56 MEST 2006


On Thu, Oct 12, 2006 at 09:22:28AM +0200, Heiko Teichmann wrote:

> I'm using rrdtool together with mrtg and wan't to read the data with a
> php script (similar to mrts). Now I facing some problems according to
> the different RRA I used.

I don't know mrts, but I don't think the problem is in that program nor
in your php script.  I think the problem is in wrong assumptions in your
reasoning.
 
> When I fill up the rra with data and compare the data for the "last" day
> with the following command (<resolution> : 300, 1800, 7200, 86400) I got
> different results (for the same range of time):
> 
> rrdtool fetch data.rrd AVERAGE -r <resolution> -s 1160438400 -e 1160524800
> 
> Resolution | Result
> 86400	|	1,7567
> 7200	|	1,7611
> 1800	|	1,7201
> 300	|	1,7201

Unknown data can play a role here.  If you have an xff setting other
than 0, weird things happen (hence "X-Files Factor" ...)

But even with xff equalling zero:  unknown data and computing averages
is problematic.

What is the average of { 1, 2, unknown, 4 } ?
What is the average of { { 1, 2 } , { unknown, 4} }

For xff == 0.5:
  average{1,2,unknown,4} == (1+2+4)/3  == 2.3333...

  cdpcontent{1,2} == 1.5
  cdpcontent{unknown,4} == 4.0

  average{1.5,4.0} == (1.5+4.0)/2 == 2.75

for xff == 0.0:
  average{1,2,unknown,4} == (1+2+4)/3  == 2.3333...

  cdpcontent{1,2} == 1.5
  cdpcontent{unknown,4} == unknown

  average{1.5,unk} == (1.5)/1 == 1.5


Different results: 1.5  and  2.333...  and  2.75 from the same data
but looking at different resolutions and/or using different xff settings.

N.B.  I may be slightly off here, it has been a while since I looked
at the full implementation details.


> I though it could not differ, because the small resolution (300)
> database feed the larger one (1800) and so on ?

This is not true.

Each time an interval is computed, it is fed to every RRA.  When an
RRA has enough data to generate a new row, it will do so.

The RRA containing 300 seconds per row, will generate a new row each
time new data is coming in.  The RRA containing 86400 seconds per row
needs 288 intervals to generate one row.

Data is not moved/copied from one rra to another.

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

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list