[mrtg] MRTG/RRD Performance tests: preliminary results

Steve Shipway s.shipway at auckland.ac.nz
Tue Sep 14 00:03:06 CEST 2010

Eric said:
> I avoid using daemon mode because I lose a lot of visibility into how
> MRTG is running. I run a cron job every minute that searches for
> config files and calls MRTG against each one individually. 

In fact, we don't use daemon mode here, either.

The reason for this is that, if using daemon mode, you need to use threading and then you lose control over the sequence in which Targets are processed -- I have some cfg files where separate Targets retrieve CPU user/wait/sys/idle stats and combine them to a graph.  The first retrieve actually gets all 4 stats but caches the second pair, so I can be sure they are all in synch.  If I used daemon mode, they might do both queries simultaneously.

I also save the error output from each cfg file run for later perusal.

I use a home-grown scheduler instead of cron, which spreads the checks of 711 cfg files over the 5min window.

The daemon-mode wins seem to be down to two things -- first, no need to re-parse the config files, and secondly, the RRD library can keep files open (and use memory-mapped IO in 1.4) which speeds up IO.


Steve Shipway
ITS Unix Services Design Lead
University of Auckland
Floor 2, 58 Symonds Street
09 3737599 ext 86487
 Please consider the environment before printing this e-mail 

More information about the mrtg mailing list