[collectd] patch to use holt-winters prediction in rrds

Shaun Lindsay shaun at meebo-inc.com
Thu Sep 16 21:01:04 CEST 2010


Hello,

I've been experimenting with using the holt-winters prediction in rrdtool
and figured it would be really nice to have the option for collectd to
create RRDs with the HWPREDICT RRAs.  The attached patch adds three
configuration options, HWPredictSeasonTimespan (the seasonality of your data
in seconds -- set this to something non-zero to enable), HWPredictAlpha
(determines the rate of intercept adaptation for holt-winters, defaults to
0.01.  Higher adapts faster.) and HWPredictBeta (determines the rate of
slope adaptation, defaults to 0.00035, higher adapts faster).

Seems to work properly in my testing, resulting in RRDs with all the
necessary RRAs.  I'm using the simple method of creating these, passing only
the HWPREDICT definition and allowing RRDtool to automatically create the
appropriate sized record-keeping RRAs.

One word of caution:  depending on the step-size chosen for your RRDs, this
can result in much larger RRDs.  Holt-Winters works on the raw data points,
not aggregated data points, which can produce some big RRAs.  If your step
size is 10 seconds and your data is periodic over a week, this will result
in RRAs with 60480 rows.  Practically, it means that the RRD filesize goes
from 58KB to 2.4MB.  I suppose that's the price to be paid if you need to
prediction functionality, though.

Anyway, hopefully someone else finds this useful!

--Shaun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20100916/83bbf597/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-allow-configuration-and-addition-of-holt-winters-pre.patch
Type: text/x-patch
Size: 3470 bytes
Desc: not available
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20100916/83bbf597/attachment.bin>


More information about the collectd mailing list