crontab -e
0 16 * * * echo "\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n$(date)\n" >> /home/simon.dudley/rocksdb-usage.txt 2>&1
1 16 * * * time /opt/besu/6000/bin/besu --config-file=/etc/besu/config.toml operator x-rocksdb usage >> /home/simon.dudley/rocksdb-usage.txt 2>&1
How to enable this feature: https://wiki.hyperledger.org/display/BESU/Limit+Trie+Logs+for+Bonsai
There is no need to keep all the trie logs for a near-head node as the state for old blocks is rarely needed. This will place a configurable limit on how many trie logs are kept reducing storage needed for a node.
--bonsai-historical-block-limit parameter
Acceptance Criteria
Notes:
ChainDataPrunercould be a helpful place to start and reuse some of the same logicTasks:
--Xbonsai-trie-log-pruning-enabled: Add trie log pruning triggered after trie log persist #6026*simon-6026*and*simon-flatdb*nodesAdd experimental x-trie-log subcommand for one-off backlog prune #6188 (needs testing on an old node to see how long it might take to run)Add --X-trie-log subcommand #6303--bonsai-historical-block-limitinstead of--Xbonsai-trie-log-retention-threshold--Xbonsai-trie-log-pruning-enabledto--Xbonsai-limit-trie-logs-enabled- YESNice to have: