Skip to content

db/kv/backup: auto-compact at 3x bloat and 5 GB free - #25493

Merged
AskAlexSharov merged 6 commits into
mainfrom
alex/auto_compact_min_free_39
Oct 29, 2026
Merged

AskAlexSharov merged 6 commits into
mainfrom
alex/auto_compact_min_free_39

Conversation

@AskAlexSharov

@AskAlexSharov AskAlexSharov commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

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.

@AskAlexSharov AskAlexSharov changed the title db/kv/backup: auto-compact from 1 GB free instead of 10 GB db/kv/backup: auto-compact at 3x bloat and 5 GB free Oct 29, 2026
@AskAlexSharov
AskAlexSharov marked this pull request as ready for review October 29, 2026 00:27
Copilot AI balanced review requested due to automatic review settings October 29, 2026 00:27
AskAlexSharov added a commit that referenced this pull request Oct 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread db/kv/backup/datadir.go Resolved
Copilot AI balanced review requested due to automatic review settings October 29, 2026 02:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the startup auto-compaction threshold changes.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 29, 2026 05:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the startup auto-compaction threshold changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 29, 2026 05:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the startup-compaction threshold changes.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 29, 2026 07:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the lowered startup-compaction thresholds and accompanying documentation updates.

No open issues 🎉

Review effort: Balanced

@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit d4e318c Oct 29, 2026
135 checks passed
@AskAlexSharov
AskAlexSharov deleted the alex/auto_compact_min_free_39 branch October 29, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants