Skip to content

perf(fibre): enable Pebble value separation for shard storage#7063

Merged
walldiss merged 2 commits intomainfrom
perf/fibre-store-value-separation
Apr 15, 2026
Merged

perf(fibre): enable Pebble value separation for shard storage#7063
walldiss merged 2 commits intomainfrom
perf/fibre-store-value-separation

Conversation

@walldiss
Copy link
Copy Markdown
Member

@walldiss walldiss commented Apr 13, 2026

Summary

Enables Pebble's value separation feature by setting FormatMajorVersion: pebbledb.FormatValueSeparation.

Motivation

The fibre store writes shard data (~400KB per upload) to Pebble. Without value separation, all values are embedded in SSTables and rewritten during compaction — burning 25-30% of fibre server CPU on data that's written once and rarely read.

The Experimental.ValueSeparationPolicy config was already present in the code, but it silently does nothing without the correct format version. Setting FormatValueSeparation (format 024) activates it — large values go to separate .blob files and compaction only touches small key references.

Confirmed via test: without the format version, zero .blob files are produced despite the policy being set. With it, SSTs shrink to just keys while shard data goes to blob files.

Changes

  • fibre/store.go: Added FormatMajorVersion: pebbledb.FormatValueSeparation to Pebble options
  • fibre/store_valsep_test.go: New test validating blob files are actually created

Test plan

  • TestValueSeparation passes (6 blob files created)
  • All 8 TestStore subtests pass
  • CI passes

Closes https://linear.app/celestia/issue/PROTOCO-1496

🤖 Generated with Claude Code


Open with Devin

Set FormatMajorVersion to FormatValueSeparation so the existing
ValueSeparationPolicy config takes effect. Without the format version,
large shard values (~400KB) stay inlined in SSTables and get rewritten
during compaction, wasting 25-30% CPU on write-once data. With value
separation enabled, values above 4KB go to .blob files that are not
recompacted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@walldiss walldiss requested a review from a team as a code owner April 13, 2026 18:41
@walldiss walldiss requested review from rootulp and removed request for a team April 13, 2026 18:41
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Comment thread fibre/store.go Outdated
Comment thread fibre/store_valsep_test.go Outdated
rootulp
rootulp previously approved these changes Apr 13, 2026
Copy link
Copy Markdown
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

golangci-lint is failing, otherwise LGTM

@evan-forbes
Copy link
Copy Markdown
Member

@claude review

claude[bot]

This comment was marked as resolved.

Remove direct Pebble test per reviewer request. Group FormatMajorVersion
with ValueSeparationPolicy config and add irreversibility warning comment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread fibre/store.go
Copy link
Copy Markdown
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

FWIW I think it was fine to retain unit tests on Pebble. Unit tests on our dependencies help us ensure that dependencies remain stable and we get signal if they break.

@Wondertan
Copy link
Copy Markdown
Member

not in this case

@walldiss walldiss added this pull request to the merge queue Apr 15, 2026
Merged via the queue into main with commit 4cf343f Apr 15, 2026
32 checks passed
@walldiss walldiss deleted the perf/fibre-store-value-separation branch April 15, 2026 13: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.

4 participants