Repository navigation
docs(bench): measure hyperd startup cost and idle memory - #386
Open
StefanSteiner wants to merge 1 commit into
Open
StefanSteiner wants to merge 1 commit into
StefanSteiner wants to merge 1 commit into
Conversation
Add a hyperd_startup_cost example that times spawn, first connect, first query and shutdown, reads idle RSS, and compares password-less with SCRAM-SHA-256 connects on a warm engine. Record the results in BENCHMARK_GUIDE.md. Phase 0 of the hyperdb-daemon extraction design.
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
Phase 0 of the
hyperdb-daemonextraction design (#385): measure what a privatehyperdcosts to start, and what one costs to keep idle, so the Phase B go/no-go has numbers behind it.hyperd_startup_costexample (hyperdb-api/benches/hyperd_startup_cost.rs): per-phase wall time (spawn to endpoint, first connect, firstSELECT 1, graceful shutdown) as min / median / p95, idle RSS after 5 s, and password-less vs SCRAM-SHA-256 connect time on a warm engine.hyperdstartup cost and idle memory" indocs/BENCHMARK_GUIDE.md.The SCRAM leg starts
hyperdwith--config(anauthorized_usersentry with a fixed, benchmark-only verifier) and--strict-settings-mode, the same configuration the design's Phase S uses.Results
Apple M3 Max, macOS 27.2.1, 96 GB, pinned
hyperdmain.0.0.26479.r96880f6a, release build, 30 iterations.SELECT 1Warm-engine connect over TCP: 0.24 ms password-less, 0.73 ms with SCRAM-SHA-256 (+0.49 ms).
Spawn to first query is about 61 ms, so startup cost alone does not justify a shared engine; the design's motivation is sharing databases across the processes of an application.
Raw output, TCP
Raw output, IPC (
BENCH_TRANSPORT=ipc)Test plan
cargo fmt --check,cargo clippy -p hyperdb-api --all-targets -- -D warningsnpx markdownlint-cli2: 0 issues