[collectd] increase time interval to 1 minute?

Florian Forster octo at verplant.org
Fri Mar 17 13:27:09 CET 2006


Hello everybody,

I've build a first version with a configurable `step' setting. One of
the problems that now arise, and a reason why I didn't implement it like
this right away, is the size of the RRAs. Since the current solution,
uhm, leaves room for improvements, I'd apprechiate some feedback.

Right now, the following RRAs are put into each automatically created
RRD file:
  RRA:AVERAGE:0.2:6:1500
  RRA:AVERAGE:0.1:180:1680
  RRA:AVERAGE:0.1:2160:1520
  RRA:MIN:0.2:6:1500
  RRA:MIN:0.1:180:1680
  RRA:MIN:0.1:2160:1520
  RRA:MAX:0.2:6:1500
  RRA:MAX:0.1:180:1680
  RRA:MAX:0.1:2160:1520

Having `static' RRAs with a `dynamic' step (it's not really dynamic;
it's a compile-time setting) seems wrong. One acceptable solution would
be to make these configurable, too. However, I have no clue how the
configure-options should look like. Suggestions, anyone?

Another possibility is to calculate the size of the RRAs, so they hold
one hour, one day, one week, one month, one year worth of data, if
appropriate. That's what I've implemented. The algorithm works along
these lines. It requires an additional argument, `width', to choose the
size of the RRA according to a desired image-size. Although the default
width is 400 pixels I've set this to 1200 since a bit more doesn't hurt
;)

  /*
   * cw:    consolidation width (number of pdps in one cdp)
   * width: width of the graph-images to optimize for
   * rows:  number of cdps in this RRA
   */
  last_cw = 0;
  for (span = hour, day, week, month, year)
  {
    if ((span / step) < width)
      continue;

    if (!last_cw)
      cw = 1;
    else
      cw = floor (span / (width * step));
    last_cw = cw;

    rows = ceil (span / (cw * step));

    RRA:AVERAGE:0.1:${cw}:${rows}
    RRA:MIN:0.1:${cw}:${rows}
    RRA:MAX:0.1:${cw}:${rows}
  }

For a step of 10 seconds (one minute) and a width of 1200 pixels (the
default right now) this would create the following RRAs:
  RRA:AVERAGE:0.1:1:8640
  RRA:MIN:0.1:1:8640
  RRA:MAX:0.1:1:8640
  RRA:AVERAGE:0.1:50:1210
  RRA:MIN:0.1:50:1210
  RRA:MAX:0.1:50:1210
  RRA:AVERAGE:0.1:223:1202
  RRA:MIN:0.1:223:1202
  RRA:MAX:0.1:223:1202
  RRA:AVERAGE:0.1:2635:1201
  RRA:MIN:0.1:2635:1201
  RRA:MAX:0.1:2635:1201

Any thoughts anyone?
Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20060317/6e6a8509/attachment.pgp


More information about the Collectd mailing list