feat(pebbleds): opt-in value separation#11385
Draft
lidel wants to merge 1 commit into
Draft
Conversation
Expose pebble's experimental ValueSeparationPolicy so IPFS blocks can be stored in append-only blob files instead of sstables, keeping only keys and small references in the LSM. - new spec options: valueSeparationEnabled, valueSeparationMinimumSize, valueSeparationMaxBlobReferenceDepth, valueSeparationRewriteMinimumAgeSeconds, valueSeparationTargetGarbageRatio; defaults exported as consts - refuses to open when enabled while formatMajorVersion is pinned below FormatValueSeparation (24), because raising the format is irreversible and must stay an explicit user decision - docs/datastores.md documents measured gains, costs, and precautions; fixes two option names that never matched the code (formatVersionMajor, walMinSyncSeconds)
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.
Exposes pebble's experimental
ValueSeparationPolicyas opt-in pebbleds config: block bytes move into append-only blob files while sstables keep only keys and small records, so even with the whole repo backed by a single pebble instance, CIDs and other small keys end up physically separated from/blocksdata and compactions stop rewriting unchanged block bytes.In local synthetic benchmarks (NVMe, ext4) this made key-only scans (the listing phase of
ipfs repo gcandipfs refs local) 19-58x faster and random 256KiB reads 10-30% faster, at the cost of 15-35% slower non-fsync writes and slower space reclamation after deletes; precautions and details are indocs/datastores.md.@gammazero curious what you think. My inclination is to park this until the policy is no longer under
Experimentalin pebble v2, but it looks promising enough to have ready, as it brings read speed gain at slight cost of writes/deletes, some users may be ok with this tradeoff.TODO