perf(fibre): enable Pebble value separation for shard storage#7063
Merged
perf(fibre): enable Pebble value separation for shard storage#7063
Conversation
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>
There was a problem hiding this comment.
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.
Wondertan
reviewed
Apr 13, 2026
rootulp
previously approved these changes
Apr 13, 2026
Collaborator
rootulp
left a comment
There was a problem hiding this comment.
golangci-lint is failing, otherwise LGTM
Member
|
@claude review |
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>
rootulp
approved these changes
Apr 14, 2026
Collaborator
rootulp
left a comment
There was a problem hiding this comment.
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.
Member
|
not in this case |
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.
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.ValueSeparationPolicyconfig was already present in the code, but it silently does nothing without the correct format version. SettingFormatValueSeparation(format 024) activates it — large values go to separate.blobfiles and compaction only touches small key references.Confirmed via test: without the format version, zero
.blobfiles 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: AddedFormatMajorVersion: pebbledb.FormatValueSeparationto Pebble optionsfibre/store_valsep_test.go: New test validating blob files are actually createdTest plan
TestValueSeparationpasses (6 blob files created)TestStoresubtests passCloses https://linear.app/celestia/issue/PROTOCO-1496
🤖 Generated with Claude Code