[mrtg] MRTG with RRDcached tuning
Mike Mitchell
Mike.Mitchell at sas.com
Wed Aug 1 14:22:57 CEST 2012
I modified 14all.cgi around line 67. Look for
### customize the html pages
and add the line
$ENV{'RRDCACHED_ADDRESS'} = 'unix:/var/tmp/rrdcached.sock';
just before it. Replace '/var/tmp/rrdchached.sock' with whatever path to the RRDcached socket you use.
I run rrdcached with only
-w 5400 -f 21600 -m 666 -j path-to-journal -p path-to-pid -l unix:path-to-socket
and no other options.
I keep my RRD files on a mirrored pair of solid-state drives. I have ~50,000 RRDs that are updated once an hour, and another ~5,000 that are updated every 5 minutes. The RRDs that are updated once an hour are very rarely looked at. RRDcached helps reduce the write cycles on the SSD.
Mike Mitchell
________________________________
From: mrtg-bounces+mike.mitchell=sas.com at lists.oetiker.ch [mrtg-bounces+mike.mitchell=sas.com at lists.oetiker.ch] on behalf of Pavel Ruzicka [pavouk at pavouk.org]
Sent: Wednesday, August 01, 2012 5:18 AM
To: Steve Shipway
Cc: mrtg at lists.oetiker.ch
Subject: Re: [mrtg] MRTG with RRDcached tuning
Hello,
> -s mrtg -m 0660 -l unix:/var/tmp/rrdcached.sock -l mrtg.auckland.ac.nz
> -l localhost -z 60
>
> -p /var/tmp/rrdcached.pid -t 4 -j /u01/rrdtool/journal -b /u01/rrdtool
> -w 1800 -O -a 6
I tried -w 1800 and -z 60, but it still doesn't solve massive pdflush.
I don't understand exactly -z option. I understand from documentation
that when I set -z to 60 seconds, that it set random write delay between 0 and 60 seconds. When I have -w for 1800, that rrdcached writes files to disk in 60 seconds and -w option is not used. Is it true?
> This has had a significant improvement on our previous IO problems.
> For the frontend, you could use Routers2 (which supports rrdcached directly
I can't change easily frontend for historical reasons :-)
> :). However, if you prefer to use 14all, then you can still do this via
>
> rrrdcached, at least if you are using Apache. Just set the
> RRDCACHED_ADDRESS environment variable appropriately in the web server so
> that it is set when the CGI is called, and this will make the 14all calls
> all use rrdcached, where possible.
> <Directory "/u01/www/cgi-bin">
>
> SetEnv RRDCACHED_ADDRESS unix:/var/tmp/rrdcached.sock
>
> </Directory>
I tried it, but it probably doesn't use rrdcached. How can I check it?
I have on graphs white space on the side. It looks like 14all.cgi use not updated rrd file.
> You might want to consider using the trunk version of rrdtool, since this
> has more comprehensive rrdcached support for the various rrdtool functions.
I prefer to use stable version, if it works.
Thank you very much for answers.
Best regards,
Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20120801/d09e5f28/attachment.htm
More information about the mrtg
mailing list