Feature #4053
closedMake backup of RRD more efficient on using /var disk space
0%
Description
On shutdown, the RRD data is all expanded from /var/db/rrd/*.rrd to /var/db/rrd/*.xml, then all the *.xml are put into /cf/conf/rrd.tgz
On low-memory (256MB) systems with a few interfaces, the RRD files can be around 10MB and the XML files end up being 35MB (example on my test system with 8 interfaces/VLANs). "/var file system full" messages appear on console during shutdown and not all the RRD data gets saved.
All that space does not fit on /var at the default 60MB. And on the low memory system, it does not work to expand /var either.
Make the code more efficient by producing each *.xml file one at a time, adding it to the compressed archive then delete it. This minimizes the temporary space taken during shutdown.
Do a similar thing when regenerating the RRD data at startup, to again minimise peak use of space in /var
Note: This has already been provided by discussion in a forum thread and commits to master (2.2) over the last week of November 2014. I thought I would add this to Redmine so that the feature/enhancement is reported on when making reports of things are new/better/changed in 2.2 - it makes 256MB systems happier.
Ref forum: https://forum.pfsense.org/index.php?topic=84693.0
Ref commits:
/etc/rc.backup_rrd.sh
https://github.com/pfsense/pfsense/commit/c1819b48708ca8d712e1a3b9b8f7b2c4ed4e056b
https://github.com/pfsense/pfsense/commit/8676899f08691ad82d8d17473efd05e04256105b
/etc/inc/rrd.inc
https://github.com/pfsense/pfsense/commit/7966b0dff9985cca43912e53b0770f9a1c981b9a
https://github.com/pfsense/pfsense/commit/7b9dfd6b32ca3d54c723295334416bcc7e5deb8a
https://github.com/pfsense/pfsense/commit/9c97e4b88cbb7cb0b7fa7248615b8e8350be993b
It is working nicely now, so this could be immediately marked resolved.
Updated by Ermal Luçi almost 10 years ago
- Status changed from New to Resolved
Commits have been made and make this happy.
Probably need to merge this in 2.1 branch that i am going to do now.