Skip to content

feat(pebbleds): opt-in value separation#11385

Draft
lidel wants to merge 1 commit into
masterfrom
feat/pebbleds-value-separation
Draft

feat(pebbleds): opt-in value separation#11385
lidel wants to merge 1 commit into
masterfrom
feat/pebbleds-value-separation

Conversation

@lidel

@lidel lidel commented Jul 2, 2026

Copy link
Copy Markdown
Member

Exposes pebble's experimental ValueSeparationPolicy as 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 /blocks data and compactions stop rewriting unchanged block bytes.

In local synthetic benchmarks (NVMe, ext4) this made key-only scans (the listing phase of ipfs repo gc and ipfs 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 in docs/datastores.md.

@gammazero curious what you think. My inclination is to park this until the policy is no longer under Experimental in 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

  • wait till its not experimental at pebble?

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)
@lidel lidel added the status/blocked Unable to be worked further until needs are met label Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/blocked Unable to be worked further until needs are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant