Re: MRTG with RRDcached tuning

Mike Mitchell <[email protected]>
Newsgroups gmane.network.mrtg.user
Message-ID <[email protected]>
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: [email protected] [[email protected]] on behalf of Pavel Ruzicka [[email protected]]
Sent: Wednesday, August 01, 2012 5:18 AM
To: Steve Shipway
Cc: [email protected]
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

_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.