Repository navigation
db/kv/backup: auto-compact at 3x bloat and 5 GB free - #25493
Merged
Merged
Conversation
AskAlexSharov
marked this pull request as ready for review
October 29, 2026 00:27
AskAlexSharov
added a commit
that referenced
this pull request
Oct 29, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The database documentation and llms-full.txt still describe outdated startup-compaction thresholds, misleading users about which databases will undergo a blocking, non-disableable rewrite at startup.
1 open issue
What changed in this PR
This PR lowers Erigon’s startup auto-compaction thresholds so databases with substantial reclaimed space, including after the recent table cleanup and pruning fixes, qualify for compaction.
Changes:
- Lowers the required free-to-live-data ratio from above 4× to above 3×.
- Reduces the minimum free space from 10 GB to 5 GB.
| File | Description |
|---|---|
db/kv/backup/datadir.go |
Lowers the ratio and minimum free-space thresholds for startup auto-compaction. |
Review effort: Balanced
sudeepdino008
approved these changes
Oct 29, 2026
AskAlexSharov
enabled auto-merge
October 29, 2026 02:46
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
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.

A chaindata with 1.6 GB of data and 7.4 GB free (after #25463 and #25465) passes the bloat ratio but not the 10 GB minimum, so it is never compacted. Ratio 3 and 5 GB free compact it once; normal prune churn stays far below 3x the data.