bench: add Tokio runtime tuning benchmark (workers + blocking-pool RSS)
bench_tokio_runtime (behind the bench feature) measures the two things
build_runtime changes vs the #[tokio::main] defaults:
A) worker over-subscription — throughput + p50/p99 of an async+CPU workload
with many workers vs core-sized, run under taskset to model a CPU quota.
B) blocking-pool RSS blast radius — peak RSS flooding the blocking pool with
memory-heavy spawn_blocking tasks, default 512 vs bounded.
No Postgres needed. Lets us verify the runtime change empirically before/after.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JG5yYZ9s868mJwqT2Qz7ez
This commit is contained in:
@@ -182,6 +182,14 @@ name = "bench_blob_prefetch"
|
||||
path = "examples/bench_blob_prefetch.rs"
|
||||
required-features = ["bench"]
|
||||
|
||||
# Tokio runtime tuning benchmark — worker over-subscription (throughput + p99
|
||||
# under CPU contention) and blocking-pool RSS blast radius, default vs tuned.
|
||||
# No Postgres needed; run under `taskset -c 0,1` to model a 2-core quota.
|
||||
[[example]]
|
||||
name = "bench_tokio_runtime"
|
||||
path = "examples/bench_tokio_runtime.rs"
|
||||
required-features = ["bench"]
|
||||
|
||||
# ACL owner-cache benchmark — owner query vs moka hit (needs the dev Postgres up).
|
||||
[[example]]
|
||||
name = "bench_owner_cache"
|
||||
|
||||
Reference in New Issue
Block a user