[rrd-users] implicit generation of HW RRAs differ from the description
Norbert Preining
norbert at preining.info
Mon Nov 28 07:34:27 CET 2016
Dear all,
I was checking how to tweak the HW prediction and started to switch from
implicit generation of the various RRA to explicit.
It turned out that what the rrdtool create does, and what is described
in the manual page (and also is close to my intuition), differ
considerably.
Please consider the following test script:
alpha=0.4
beta=0.001
start=$(date --date="2016-09-01 00:00" +%s)
commonargs="--start $start --step 5s DS:someval:GAUGE:20m:U:U RRA:AVERAGE:0.5:5s:3d"
rm auto.rrd manual.rrd
rrdtool create auto.rrd $commonargs \
RRA:HWPREDICT:1w:$alpha:$beta:1d
rrdtool create manual.rrd $commonargs \
RRA:HWPREDICT:1w:$alpha:$beta:1d:3 \
RRA:SEASONAL:1:$alpha:2 \
RRA:DEVSEASONAL:1:$alpha:2 \
RRA:DEVPREDICT:1w:4 \
RRA:FAILURES:1:7:9:4
rrdinfo auto.rrd > auto.info
rrdinfo manual.rrd > manual.info
diff -u auto.info manual.info
exit 0
The above two invocations generate the same content checked via rrdtool dump and diff
(only differences are in cur_row values).
Now this seems to be in contrast to the description in the man page of rrdcreate:
The SEASONAL and DEVSEASONAL RRAs store the seasonal coefficients for the Holt-Winters
forecasting algorithm and the seasonal deviations, respectively. There is one entry per
observation time point in the seasonal cycle. For example, if primary data points are
generated every five minutes and the seasonal cycle is 1 day, both SEASONAL and
DEVSEASONAL will have 288 rows.
But indeed, the dump of the rrdtool auto creation does set the seasonal and devseasonal to 1 row only!
Furthermore, concerning the RRA:FAILURES:
argument. If the FAILURES RRA is implicitly created, rows will be set to the seasonal
period argument of the HWPREDICT RRA. Of course, the RRDtool resize command is available
if these defaults are not sufficient and the creator wishes to avoid explicit creations
of the other specialized function RRAs.
Furthermore, also the failures only contain 1 row, which is incorrect.
So if I want to create something that conforms with the description in the man page,
I need to use
rrdtool create manual.rrd $commonargs \
RRA:HWPREDICT:1w:$alpha:$beta:1d:3 \
RRA:SEASONAL:1d:$alpha:2 \
RRA:DEVSEASONAL:1d:$alpha:2 \
RRA:DEVPREDICT:1w:4 \
RRA:FAILURES:1d:7:9:4
Now the question is, which data does the internal rrd HW computation use?
Is there a misunderstanding from my side, or is something missing in my view?
Thanks a lot
Norbert
--
PREINING Norbert http://www.preining.info
Accelia Inc. + JAIST + TeX Live + Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
More information about the rrd-users
mailing list