[mrtg] Performance

McDonald, Dan Dan.McDonald at austinenergy.com
Tue Nov 18 21:00:48 CET 2008


On Tue, 2008-11-18 at 20:34 +0100, Jakub M wrote:
> Also, I am running MRT from /etc/cron.d as multiple entries every 5
> minutes - is it OK? I mean, I have dozens of entries in cron.d, 

you are, therefore, loading dozens of copies of perl every 5 minutes.
That chews up ram, and if you run out, then the box swaps.  swapping is
bad for performance.


> maybe
> it is better to run it as a single MRTG run (with a terribly long
> command line?)


No, my command line is very short:
[mcdonalddj at ldap cfg]$ sudo cat /etc/cron.d/mrtg
*/5 * * * * mrtg /usr/local/bin/mrtg /var/mrtg/cfg/mrtg.cfg
--logging=mrtg.log

but mrtg.cfg is very large.  It is full of Include: statements, e.g:

Include: /var/mrtg/cfg/common.cfg
Include: /var/mrtg/cfg/sitea/sitea-router1.cfg
Include: /var/mrtg/cfg/sitea/sitea-router2.cfg
Include: /var/mrtg/cfg/sitea/sitea-ups1.cfg
...

In common.cfg, I have all of the standard things, like LogDir:, HtmlDir:
and ImageDir:, the forks: declaration, and LogFormat: rrdtool

mrtg farms out the polling amongst the 30 forks, then does the disk
writes sequentially so as to minimize disk collisions.


-- 
Daniel J McDonald, CCIE #2495, CISSP #78281, CNX
Austin Energy
http://www.austinenergy.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20081118/9f62c3a2/attachment.bin 


More information about the mrtg mailing list