Repository navigation
kv-compare: cold-cache read benchmark, and a Graviton4 + gp3 run - #172
Merged
Merged
Conversation
Add `cold.sh`: first reads of a process with nothing cached, on a data set larger than its memory limit, for LMDB and ZeroDB, with ZeroDB's page size and kernel read-ahead as variables. Each result records the block device's read requests and bytes. The LMDB and ZeroDB readers now read every byte of a value. Before, a value stored in an overflow page cost no disk read, so large-value reads measured only the tree descent. Record the run on Graviton4 with EBS gp3, and the hook-cell experiment (flat, reverted) in the perf ledger. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
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.
Stacked on #171 (base
review-fixes). Benchmark tooling and results only: no engine code changes.What this adds
benches/kv-compare/cold.shmeasures the first reads of a process with nothing cached, on a data set several times larger than its memory limit. It runs LMDB and ZeroDB, with two settings as variables: ZeroDB's page size (--page-kib) and kernel read-ahead (--read-ahead). Each measurement runs in its own process and memory-limited cgroup, right after a page-cache drop, with no warm-up.cold-report.pyprints the table.benches/results/2026-11-12-cold-cache-reads-graviton-gp3.md.Cold-cache results
Graviton4
c8g.xlarge, EBS gp3 at 3,000 IOPS, 1 GiB memory limit, about 5.5 GiB of data. One 60-second run per cell.Point reads without read-ahead, reads/s:
Range scans of 100 keys, one thread, scans/s:
The experiment that did not work
I tried skipping the commit-hook lock when no hook is installed, expecting it to narrow the per-commit gap.
just bench-abon Graviton4 came back flat on every rung (speedup 0.995 to 1.004, LMDB drift at most 1.1 %), so the change is reverted and recorded inperf-ledger.jsonl. An empty write transaction returns before the first hook site, and five uncontended locks are under 1 % of a one-put commit.Checks
cargo fmt --checkandcargo clippy --releaseinbenches/kv-compare(macOS): clean.cold.shchange, which raises the kernel's dirty-page limits during the loads and restores them on exit. For the recorded run the limits were raised by hand; the script change is only syntax-checked.Unrelated finding
just perf-ledger showfails onmainwithKeyError: 'ratio_vs_lmdb_before'on an older entry. Not touched here.🤖 Generated with Claude Code