Slow Cacti Graph Rendering
I’ve been running Cacti at home to keep track of a number of things. It’s wonderful, and I highly recommend it if you understand the phrase “turn on SNMP”.
But ever since upgrading to Solaris 11 Express, Cacti graph rendering has been extremely slow. The PHP renders fine, but the graphs would take several seconds per graph and with some pages having upwards of 20 graphs it was becoming quite aggravating to me.
I’ve been searching off and on for months about why, and most things I can find
about rrdtool rendering being slow are completely irrelevant to Solaris, but I
finally got a break. I found this Debian bug report. The problem
apparently has to do with the new FreeDesktop
architecture. Rrdtool now uses fontconfig caching. Both Solaris 11 and
Debian’s default permissions on /var/cache/fontconfig are 755. Setting the
permissions to 1777 and reloading the page did the trick. Rrdtool
apparently doesn’t need the permissions world readable forever. Just that first
time. After rrdtool writes the cache once you can set the permissions back to
755.
Enjoy your speedy Cacti.