[mrtg] Performance

Steve Shipway s.shipway at auckland.ac.nz
Wed Nov 19 00:20:39 CET 2008

Having spoken with Tobi and others at the LISA08 conference, I'm going to be
expanding the chapter on performance in the book once I've run some more


Some main points that come out for performance improvement seem to be -


0) Obviously, MRTG/RRD beats native mode MRTG by about a factor of 100.

1) RRDtool 1.3.x has some cool memory-mapped IO stuff, and cache-hints
(under Linux) that should make a pretty good performance win over RRDtool

2) Running MRTG in daemon mode with Threads (using a big Include:d
master.cfg file) will help a lot as well, but runs the risk of one typo
killing everything.  At least this is easy to detect, though.  We currently
use multiple-MRTG instances with threads for this reason.

3) Tuning the filesystem cache timeout (eg, to 5min rather than 20sec) will
give big performance gains at the expense of resilience to data loss on
crashing.  Should be a win, though.  RRD files are very very hard to corrupt
as they are fixed-length.

4) Mounting with the noatime option can help but not much


I will run some tests here on relative performance when I've the time and
let people know, if they're interested.


I believe that (2) may now give a much larger performance boost than
previously as MRTG 2.16.x and RRD1.3.x can work together with delayed writes
and memory-mapped IO to greatly decrease filesystem IO when run in daemon


Has anyone else done any performance tests for MRTG covering these (or
other) tunable parameters?  Please let me know so we can pool observations
and results.


As far as other Include stuff goes, I'd like to see something like

  Include: filename.cfg

  IncludeAll: */wildcarded*/filename*.cfg

  IncludeOptional: filename.cfg

since this would be backwards-compatible with previous config files.  I
could add support to Routers2 pretty easily.  No time for it now, though.
Also, typos in the file should probably be warnings rather than hard errors,
and maybe MRTG in daemon mode should periodically check the 'last modified'
time on the files or dirs and re-read the config files if it detects changes
(Routers2 already does this when in caching mode :P ).  But I'm drifting



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20081119/feb6d1a2/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3092 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20081119/feb6d1a2/attachment-0001.bin 

More information about the mrtg mailing list