Skip to content

Refresh PedraDB snapshot adapter to latest main and rebenchmark - #20

Draft
jaredLunde wants to merge 7 commits into
mainfrom
cursor/pedradb-latest-master-bench-d320
Draft

jaredLunde wants to merge 7 commits into
mainfrom
cursor/pedradb-latest-master-bench-d320

Conversation

@jaredLunde

@jaredLunde jaredLunde commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Re-runs the PedraDB vs RocksDB vs fjall snapshot comparison from #19 against current Pedra main.

  • Pins rocksdb-compat to 60d88f48 (main as of 2026-09-24). Two later commits (057e3f61, 4d5d8c74) are not on main and are not pinned.
  • The PedraDbSnapshot adapter compiles unchanged. Pedra snapshot-store tests pass (24/24).
  • snapshot_backends skips settle() unless free disk can hold a 2× fjall rewrite.

Host: 4 vCPU, 16 GiB RAM, 254 GiB ext4, 1 GiB block cache, 200 B values, one run per cell. Fjall and RocksDB do not link Pedra.

100M, settled

fjall rocksdb pedradb
hydrate 106 s (0.94 M/s) 108 s (0.93 M/s) 98 s (1.02 M/s)
settle 82.5 s 5.0 s 2.0 s
cold hit p50 78 µs 52 µs 25 µs
cold miss p50 419 ns 339 ns 528 ns
warm get_hit 37.3 µs 37.3 µs 19.9 µs
prefix scan (1k) 194 µs 167 µs 205 µs
100-key get-loop — 3.79 ms 2.05 ms
100-key multi_get — 3.87 ms 2.17 ms

500M, unsettled

Settle skipped (fjall rewrite needs ~2× disk).

fjall rocksdb pedradb
hydrate 553 s (0.90 M/s) 512 s (0.98 M/s) did not finish
on disk 105.3 GiB (226 B) 106.7 GiB (229 B) —
cold hit p50 46 µs 78 µs —
cold miss p50 425 ns 604 ns —

Pedra's 500M hydrate does not fit in 16 GiB. The OOM killer stopped the unclamped run at 48% (15.4 GiB anonymous RSS). With PEDRA_STAGE_MAX_BYTES=67108864 it was still at 11.8 GiB by 32% and was stopped. RSS tracked key count at roughly 64 B/key.

Test plan

  • cargo test --release --features fjall,rocksdb,pedradb --test snapshot_store pedradb_
  • 100M three-way, settled
  • 500M fjall and RocksDB, unsettled
  • 500M Pedra attempted (unclamped and 64 MiB stage clamp); both exceed 16 GiB RAM
Open in Web Open in Cursor 

cursoragent and others added 7 commits August 30, 2026 15:57
Wire a pedradb feature (rocksdb-compat git dep) that implements the same
on-disk fold contract as fjall/rocksdb, extend the conformance suite, and
compare all three engines in snapshot_backends.

Co-authored-by: Jared Lunde <jared.lunde@gmail.com>
Depend on rocksdb-compat directly (import as rocksdb_compat) instead of
renaming the package to pedradb.

Co-authored-by: Jared Lunde <jared.lunde@gmail.com>
Pin rocksdb-compat to latest Pedra (5b6789c), run backends one-at-a-time
when entries ≥ 50M so a ~250 GiB disk can hold a 1B fold, and add progress
logging / settle headroom checks / backend selection env knobs.

Co-authored-by: Jared Lunde <jared.lunde@gmail.com>
The snapshot adapter in #19 was pinned to 5b6789c. Pedra main has moved
186 commits; keep the same SnapshotStore surface and relock against the
current revision so the backend comparison can be rerun.

Co-authored-by: Jared Lunde <jared.lunde@gmail.com>
The 1.3x headroom check started a 500M fjall settle on a 254 GiB volume
and the rewrite climbed past 150 GiB. Require 2.1x free space, matching
the documented peak, so the large-N comparison skips settle instead of
filling the disk.

Co-authored-by: Jared Lunde <jared.lunde@gmail.com>
main no longer contains 4d5d8c74. That commit and 057e3f61 were removed
after the first pin; relock rocksdb-compat to the branch tip before
rerunning the snapshot comparison.

Co-authored-by: Jared Lunde <jared.lunde@gmail.com>
100M settled finishes on this host: Pedra leads hydrate, settle, and
point gets. 500M Pedra does not: anonymous RSS tracks key count and the
16 GiB guest runs out of memory around 160–240M keys.

Co-authored-by: Jared Lunde <jared.lunde@gmail.com>
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.

2 participants