[rrd-developers] rrdcached performance problem

Thorsten von Eicken tve at voneicken.com
Fri Oct 30 17:19:30 CET 2009

Thorsten von Eicken wrote:
>> 37.1 % of the time it spent in “handle_request_update” the daemon is
>> actually waiting for “realloc”. This is (to me) very unexpected and a
>> schoolbook example of “measure before you optimize”.
>> I think we can get rid of this bottleneck by writing a specialized
>> version of “rrd_add_strdup” which reallocates powers of ten. Something
>> like:
>> [...]
>> It'd be great if you could give the attached patch a try
> spends all of its time (more than 99 %) in “realloc”. So in consequence
> Test is running, including Kevin's simplification... Thanks for the 
> help!!!
Things are again looking much better, almost great I should say! The one 
thing that still makes me a bit uncomfortable is that at the end of the 
second hour of run-time there was a cpu spike which caused collectd to 
grow rapidly. (Still using -w 3600 -z 3600 -f 7200, I put a load of ~50k 
tree nodes right from the start.) You can see the graphs at 
http://www.voneicken.com/dl/rrd/ look for the rrdcached-6* series. It 
flattens out nicely after the spike, but it's one of those things that 
tend to bite sooner or later. I'm not sure what to do about it.

More information about the rrd-developers mailing list