-
Notifications
You must be signed in to change notification settings - Fork 929
history-expiry: RocksDB BlobDB GC tuning CLI Config #8599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+363
−41
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Xplugin-rocksdb-blob-garbage-collection-age-cutoff configures blob_garbage_collection_age_cutoff --Xplugin-rocksdb-blob-garbage-collection-force-threshold configures blob_garbage_collection_force_threshold Signed-off-by: Simon Dudley <[email protected]>
…onfigure BLOCKCHAIN BlobDB GC specifically Signed-off-by: Simon Dudley <[email protected]>
Rather than hardcoding RocksDB defaults in Besu Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
macfarla
reviewed
May 12, 2025
|
||
/** | ||
* The Blob garbage collection age cutoff. The fraction of file age to be considered eligible for | ||
* GC; e.g. 0.25 = oldest 25% of files eligible; e.g. 1 = all files eligible When unspecified, use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
* GC; e.g. 0.25 = oldest 25% of files eligible; e.g. 1 = all files eligible When unspecified, use | |
* GC; e.g. 0.25 = oldest 25% of files eligible; e.g. 1 = all files eligible. When unspecified, use |
macfarla
approved these changes
May 13, 2025
Signed-off-by: Simon Dudley <[email protected]>
This was referenced May 20, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces three new options:
--Xplugin-rocksdb-blockchain-blob-garbage-collection-enabled
is a custom Besu option that enables GC for the BLOCKCHAIN column family, which leads to some space amplification even before performing any pruning.--Xplugin-rocksdb-blob-garbage-collection-age-cutoff
configuresblob_garbage_collection_age_cutoff
RocksDB option--Xplugin-rocksdb-blob-garbage-collection-force-threshold
configuresblob_garbage_collection_force_threshold
RocksDB optionRocksDB options will apply to all column families with BlobDB and GC enabled, currently just TRIE_LOG_STORAGE and if configured, BLOCKCHAIN.
If non-default settings are used, these are displayed in the config overview:
From https://github.com/facebook/rocksdb/wiki/BlobDB#column-family-options:
The idea is to perform pruning with the
storage prune-premerge-blocks
subcommand and then temporarily enable these three options with recommended setting in order to get Besu to reclaim the space, but then disable them afterwards, since BLOCKCHAIN GC is not required once the pruning space is reclaimed:Next step is to bundle these settings together in a convenience option e.g.
--history-expiry-prune
Testing
See #8599 (comment)
TODO
This PR can merge as is, but to confirm the best settings would like to do more testing with "less aggressive but all files" setting:
and the maybe the settings from #8480
Next step is to bundle these settings together in a convenience option e.g.
--history-expiry-prune