Fixing the RRD IO Hell

So I’m using collectd to monitor my systems. For a couple of machines it was fine, but as soon as it got more collectd caused a constant load on my disks due to all the RRD files that need to be written.

In order to reduce this I decided to use rrdcached, which comes with the default RRD install on FreeBSD. It can be configured for collectd on FreeBSD as follows:

<Plugin rrdcached>
        DaemonAddress "unix:/var/run/rrdcached.sock"
        DataDir "/var/db/collectd/"
        CreateFiles true
        CreateFilesAsync false
        CollectStatistics true

Restarting collectd the results became immediately noticeable:

Disk Traffic

The blue read spike is from a backup job that runs at midnight

In conclusion: The server has now less free memory but more free IO time.