Back to OP5 Monitor FAQ

How to adjust rrdcached options to increase IO performance

If you have lots of services and experience IO related performance issues you might want to adjust the rrdcached options. In a default installation of OP5 Monitor all options below are set to the default.

The most interesting options are these (taken from the manpage of rrdcached:

-w timeout
 Data is written to disk every timeout seconds. An optional suffix may be used (e.g. "5m" instead of 300 seconds). If this option is not specified the
 default interval of 300 seconds will be used.

-z delay
 If specified, rrdcached will delay writing of each RRD for a random number of seconds in the range [0,delay). This will avoid too many writes being queued
 simultaneously. This value should be no greater than the value specified in -w. An optional suffix may be used (e.g. "3m" instead of 180 seconds). By
 default, there is no delay.

-f timeout
 Every timeout seconds the entire cache is searched for old values which are written to disk. This only concerns files to which updates have stopped, so
 setting this to a high value, such as 3600 seconds, is acceptable in most cases. An optional suffix may be used (e.g. "1h" instead of 3600 seconds). This
 timeout defaults to 3600 seconds.

 -t write_threads
 Specifies the number of threads used for writing RRD files. The default is 4. Increasing this number will allow rrdcached to have more simultaneous I/O
 requests into the kernel. This may allow the kernel to re-order disk writes, resulting in better disk throughput.

To set these options you need to edit /usr/lib/systemd/system/rrdcached.service and change this line:

ExecStart=/usr/bin/rrdcached -g

To something like:

ExecStart=/usr/bin/rrdcached -g -w 15m -z 15m -f 30m -t <NUMBER OF THREADS>

Then restart rrdcached:

# systemctl daemon-reload
# systemctl restart rrdcached
["Geneos"] ["FAQ"]

Was this topic helpful?