[rrd-developers] rfc: later caching

kevin brintnall kbrint at rufus.net
Fri Apr 17 15:52:07 CEST 2009


On Fri, Apr 17, 2009 at 02:39:42PM +0200, Sebastian Harl wrote:
> Hi Kevin,
> 
> On Fri, Apr 17, 2009 at 07:34:10AM -0500, kevin brintnall wrote:
> >  - on the first updatev, take an in-memory copy of the live_head and *_prep
> >    - no need to do it for update
> >    - CON: when the daemon starts up, there is heavy read load
> 
> Uhm, I don't get that. Why would you get heavy read load on startup if
> the header is not read until receiving the first updatev? What am I
> missing?

The users that benefit most from rrdcached are those with a high
update/sec rate, especially with a large number of RRDs.  Also, the
underlying assumption of RRD is that statistics are gathered at defined
intervals.

Upon startup, rrdcached won't have any of the header information in
memory.  As soon as it starts receiving updates it will have to read all
the headers for the entire working set.

> On a related note: How much overhead (in memory usage) do you expect by
> caching the file headers?

If I'm not mistaken...

  sizeof(stat_head_t)
+ sizeof(ds_def_t)  * ds_cnt
+ sizeof(rra_def_t) * rra_cnt
+ sizeof(live_head_t)
+ sizeof(pdp_prep_t) * ds_cnt
+ sizeof(cdp_prep_t) * rra_cnt * ds_cnt

-- 
 kevin brintnall =~ /kbrint at rufus.net/



More information about the rrd-developers mailing list