[rrd-developers] Accelerator Daemon

Hamish Marson hamish at travellingkiwi.com
Tue Jul 1 09:28:54 CEST 2008


Quoting Florian Forster <rrdtool at nospam.verplant.org>:

> Hi Bernard,
>
> On Mon, Jun 30, 2008 at 02:00:57PM -0700, Bernard Li wrote:
>> > Yes, that's probably right. I didn't expect anyone with such a huge
>> > number of RRD files to generate graphs periodically/statically
>> > instead of on demand/dynamically.. Is anyone with a big number of
>> > files doing that? If so: Why?
>>
>> I am not sure if Ganglia fits your description, but I will describe
>> what it does.
>
> as far as I know (and see) Ganglia fit's my view of how big setups work
> exactly: There are RRD files which are updated often and graphs (i. e.
> PNG or GIF images) which are generated by a CGI script or PHP module
> ``on demand'' (i. e. rarely). So Gnaglia setups will benefit from
> ``rrdcached'' a lot, I think..
>
> The setups that will not benefit from that daemon generate the _graphs_
> often, i. e. every time they update the RRD files. They would do
> something like this, for example:
>   VALUE=`cat | grep | sort | whatnot`
>   rrdtool update $FILE N:$VALUE
>   rrdtool graph /www/$FILE.hour.png -s -3600 ...
>   rrdtool graph /www/$FILE.day.png  -s -86400 ...
>   ...

To be honest, anyone generating graphs that often probably needs to go  
back through & examine their code... And their usage. Updating a graph  
for a whole day every time you update the RRD is pretty bad...  
Especially since not every call to rrdupdate actually generates new  
datapoints (Remember the rate saved is calculated as the average & max  
of the values updated over the averaging period).

I've had some pretty inefficient stuff in the past when I was feeling  
lazy, but even then it was update every 20secs on a 60sec average, and  
generating graphs every 5 minutes via cron (My newer stuff tends to  
use CGI's to generate new graphs on demand. With a lot of graphs  
that's way more efficient. Because there's just so many that get  
generated and hardly looked at).

Maybe a better use of a caching damon in that situation would be to  
generate graphs and cache them. Returning the same content withhout  
regenerating until the data had actually changed enough to make a  
difference in the graph...



>
> Regards,
> -octo
> --
> Florian octo Forster
> Hacker in training
> GnuPG: 0x91523C3D
> http://verplant.org/
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the rrd-developers mailing list