Collection3: Graphing speed improvements with many hosts
authorStefán Þorvarðarson <stefanth@siminn.is>
Thu, 10 Mar 2016 14:57:11 +0000 (14:57 +0000)
committerStefán Þorvarðarson <stefanth@siminn.is>
Thu, 10 Mar 2016 14:57:11 +0000 (14:57 +0000)
commit2a21d97cffadd2d329a48693267eb0bda59bd35e
treecea2feb4be1cb1144bc82488e75eb741fe1909f8
parent3443ff673c02123226bc3838ee4d9ed4831ff717
Collection3: Graphing speed improvements with many hosts

At present graph.cgi is extremely slowly on servers with large numbers of
RRD files.  This is because it issues an unnecessary stat() call to _every_
RRD file on the local system before loading and rendering graph data.

Patch originally from:
http://mailman.verplant.org/pipermail/collectd/2011-May/004519.html

The patch was improved so that it correctly handles multiple hostnames.

I'm seeing a 5x improvement in speed, the original patch creator
had a 24x speedup.
contrib/collection3/lib/Collectd/Graph/Common.pm