[rrd-users] RRDs with unpredictable update time

A Darren Dunham ddunham at taos.com
Wed Mar 25 00:03:05 CET 2009


On Tue, Mar 24, 2009 at 10:42:09PM +0100, Till D?rges wrote:

> For performance reasons, 'rrdtool update' should only be called, when
> there actually is data. This means for the example below, it's called
> only 5 times.

Is it really that much of a performance problem?

> If I do an update (with a value of 0) every 300 seconds, all values
> are in the RRA as I would expect it, but like I said, if possible I'd
> like to avoid updates if there is no data.

You could extend your heartbeat, but the RRD is going to assume that in
the absence of data that it should interpolate between known data
points, not assume zero which you want.

One suggestion is that when a new point needs to be entered, do the
following:

Query the RRD for the last value.
Calculate bins between that value and your current update that you want
to record zero for.
Run an update to insert zeros there.
Update your current value.

This takes a bit more math on your side, but it should be very
efficient.  You can give multiple timestamp/values to update so it
shouldn't be a performance hit.

-- 
Darren



More information about the rrd-users mailing list