[rrd-users] BUG in "RRA:MAX:0.5:6:700"

Rui Vitor Figueiras Meireles rui-f-meireles at telecom.pt
Thu Mar 18 11:30:28 CET 2010


Tobi, thanks a lot for the quick answer!
I'll be sure to update as soon as Version 1.4.3 comes out... Or maybe I'll try the fixes.


Best Regards
Rui Meireles,

-----Original Message-----
From: Tobias Oetiker [mailto:tobi at oetiker.ch] 
Sent: quarta-feira, 17 de Março de 2010 21:54
To: Rui Vitor Figueiras Meireles
Cc: rrd-users at lists.oetiker.ch
Subject: Re: [rrd-users] BUG in "RRA:MAX:0.5:6:700"

Hi Rui,

Today Rui Vitor Figueiras Meireles wrote:

> I noticed a problem in my RRDs. I several RRD files, running RRDtool 1.2.19 in Solaris 10:
>
> I use:
>
>  *   GAUGE RRDs
>  *   300sec step
>  *   RRA with 1 PDP/ROW for AVERAGE
>  *   RRA with 1 PDP/ROW for MAX
>  *   RRA with 6 PDP/ROW for AVERAGE
>  *   RRA with 6 PDP/ROW for MAX
> (the info of the RRD is listed below)
>
> I always update the values using "rounded times" (times that are multiple of 300).
> However, some consecutive values of my rra[3] (MAX - 6 values) appeared exactly the same value (and I thought it was very odd).
>
> I did the "rrdtool fetch", I did all the maths, and realized that this wasn't doing what I supposed it should be!
>
> AVERAGE uses the last 6 values for the calculation
> but
> MAX uses the last 7 values for the calculation

yes ... I found this two a few days ago ... the fix is in 2023:2024

it will be in 1.4.3
>
> Ex:
>
> AVERAGE (6 values)
>
> rra[1](1268674200) = AVERAGE (
> rra[0](1268672700),
> rra[0](1268673000),
> rra[0](1268673300),
> rra[0](1268673600),
> rra[0](1268673900),
> rra[0](1268674200)
> )
> rra[1](1268676000) = AVERAGE (
> rra[0](1268674500),
> rra[0](1268674800),
> rra[0](1268675100),
> rra[0](1268675400),
> rra[0](1268675700),
> rra[0](1268676000)
> )
>
> MAX (7 values)
>
> rra[3](1268674200) = MAX (
> rra[2](1268672400),
> rra[2](1268672700),
> rra[2](1268673000),
> rra[2](1268673300),
> rra[2](1268673600),
> rra[2](1268673900),
> rra[2](1268674200)
> )
> rra[3](1268676000) = AVERAGE (
> rra[2](1268674200),
> rra[2](1268674500),
> rra[2](1268674800),
> rra[2](1268675100),
> rra[2](1268675400),
> rra[2](1268675700),
> rra[2](1268676000)
> )
>
> Now my questions is: Is this a Bug, or a feature?
> If it is a feature it's very strange, because whenever I get a high value in a rounded time (multiple of 300) that value will become the MAX of the 2 consecutive groups in the RRA that consolidates 6 values. How is this helpful?

it is a bug, its origin is an optimization where the default case
was ignored ...

>
> I hope I could make myself clear. If not, I can send a XLS file with my calculations, so that you can see this systematic error.
> Thanks in advance to anyone that can answer me.

yes :-)

cheers
tobi
>
> Rui Meireles
>
>
> # rrdtool info TOTAL.rrd
> filename = "TOTAL.rrd"
> rrd_version = "0003"
> step = 300
> last_update = 1268853900
> ds[in].type = "GAUGE"
> ds[in].minimal_heartbeat = 600
> ds[in].min = 0.0000000000e+00
> ds[in].max = 5.0000000000e+11
> ds[in].last_ds = "307502466.241261"
> ds[in].value = 0.0000000000e+00
> ds[in].unknown_sec = 0
> ds[out].type = "GAUGE"
> ds[out].minimal_heartbeat = 600
> ds[out].min = 0.0000000000e+00
> ds[out].max = 5.0000000000e+11
> ds[out].last_ds = "8028989485.28258"
> ds[out].value = 0.0000000000e+00
> ds[out].unknown_sec = 0
> rra[0].cf = "AVERAGE"
> rra[0].rows = 600
> rra[0].pdp_per_row = 1
> rra[0].xff = 5.0000000000e-01
> rra[0].cdp_prep[0].value = NaN
> rra[0].cdp_prep[0].unknown_datapoints = 0
> rra[0].cdp_prep[1].value = NaN
> rra[0].cdp_prep[1].unknown_datapoints = 0
> rra[1].cf = "AVERAGE"
> rra[1].rows = 700
> rra[1].pdp_per_row = 6
> rra[1].xff = 5.0000000000e-01
> rra[1].cdp_prep[0].value = 1.5398389100e+09
> rra[1].cdp_prep[0].unknown_datapoints = 0
> rra[1].cdp_prep[1].value = 5.2927918671e+10
> rra[1].cdp_prep[1].unknown_datapoints = 0
> rra[2].cf = "MAX"
> rra[2].rows = 600
> rra[2].pdp_per_row = 1
> rra[2].xff = 5.0000000000e-01
> rra[2].cdp_prep[0].value = NaN
> rra[2].cdp_prep[0].unknown_datapoints = 0
> rra[2].cdp_prep[1].value = NaN
> rra[2].cdp_prep[1].unknown_datapoints = 0
> rra[3].cf = "MAX"
> rra[3].rows = 700
> rra[3].pdp_per_row = 6
> rra[3].xff = 5.0000000000e-01
> rra[3].cdp_prep[0].value = 3.1016264837e+08
> rra[3].cdp_prep[0].unknown_datapoints = 0
> rra[3].cdp_prep[1].value = 1.2197452159e+10
> rra[3].cdp_prep[1].unknown_datapoints = 0
>
>
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900




More information about the rrd-users mailing list