Disable RRD write cache when Reporting Database is unchecked
Whenever the UI requests stats from a date range, the array returned always has a varying number of trailing undefined values. I spoke with William from the middleware team and it seems this is a problem with rrdtool's behavior so I'm assigning this ticket to OS/Services.
#2 Updated by Alexander Motin over 2 years ago
- Status changed from Unscreened to Screened
- Severity changed from New to Low Medium
If I understand right what you are talking about, that is not a bug, but an optimization from collectd side to not kick disk storing RRDs with writes too often for every sample for every graph, since it would cause huge write amplification. May be it can be optimized depending on situation. We could completely disable that optimization when data are stored on tmpfs. Otherwise, for data stored on ZFS we could probably reduce ZFS recordsize for dataset storing RRDs from 128K to lets say 16K to reduce the write amplification.
Also IIRC collectd can be made to flush data to disk on request by sending it some signal (SIGHUP?), though not sure how useful is that in real life in case of constantly refreshing graphs.
#3 Updated by Alexander Motin about 2 years ago
- Status changed from Screened to In Progress
- Target version changed from 11.2-RC2 to 11.2-BETA2
I've disabled write caching when RRDs are stored on tmpfs ("Reporting Database" is unchecked), that should make graph much more interactive. The opposite case unfortunately does not have an easy solution, but I'll take another look whether it can be optimized somehow.
#9 Updated by Aaron St. John about 2 years ago
- Status changed from Ready for Testing to Passed Testing
Tested by first ensuring “Reporting Database” was unchecked in System > System Dataset. Then used mount to find that tmpfs on /var/db/collectd/rrd (tmpfs, local). Checked the contents of /etc/local/collectd.conf and found that the paramater CacheTimeout was not present.