Repository navigation
3.x.x: model rental churn in the load harness: bursts, abrupt departures, reconnect storms, and a rental-churn nightly preset (#521) - #539
Merged
Conversation
…res, reconnect storms, and a rental-churn nightly preset (#521) Production does not hold a fixed set of sessions. Hash rental arrives as a burst of sessions within seconds, mines for a heavy-tailed lifetime and leaves by dropping its sockets. A rental failing over between pools drops and reconnects many sessions at once. Mainnet records no connection velocity, so the model is a seeded parameter sweep, off by default and pinned by presets. --churn-seconds adds a churn side phase after slow_database (after warm-up under --plan tips), with no proxy delay and outside the artifact. In it: - Rental bursts (--rental-bursts: a list or pareto/lognormal draws) connect within a burst window. The rentals mine for the heaviest address at --rental-hashrate times a mean session. - Each rental leaves after a seeded heavy-tailed lifetime by closing its socket with no quiesce. Its abandoned submits are recorded as churn closes. A share the server committed anyway is reported as such, never as an ACK/commit divergence. - Reconnect storms drop a seeded fraction of the connected sessions, which come back within a seeded delay. - --churn-tips mints tips through the phase. The connection cap and file-descriptor limit are sized for the peak rentals. The report's churn block records: - the plan and the realised churn: spawns, departures, abrupt closes, storms, reconnects, and connects and concurrent sessions per second; - new-session time to first job; - per-tip delivery over the sessions connected at the tip: served, left first, or unserved. Two new gates hold the connected-at-tip p99 and the first-job p99. The run-wide time_to_usable_work stays over the run's own sessions. The rental-churn preset (nightly, 8 vCPU) runs the mainnet-floor population through bursts of 100, 500 and 2,000 sessions within 10 s, Pareto(1.2) lifetimes from 30 s, and storms of 10%, 25% and 50%, with 8 tips. The smoke preset gains a 30 s churn phase. Refs #521 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
Review ledger (head
|
| # | Finding | Disposition |
|---|---|---|
| 1 | A storm counts every unpaused session as connected. If --storm-reconnect-seconds is at least --storm-interval-seconds, a session still offline from the previous storm can be picked again; the client ignores that Depart, so dropped overstates the realised storm |
Known limitation, not reachable by any checked-in preset: the reconnect windows are 3-5 s against storm intervals of 20-90 s. A follow-up PR adds an entry check refusing a reconnect window at least as long as the storm interval, with a test |
Mutant. A server that stalls every new connection's first job by 6 s fails the smoke test: new-session first-job p99 was 12.5 s against the 5 s budget.
Local rental-churn run (release builds, private PostgreSQL 16 with fsync on, a shared development host, so indicative): pass. Exit 0, reconciled exactly.
- 2,600 rentals spawned; 2,142 left abruptly; 3 storms.
- Peak 2,528 concurrent sessions; at most 213 connects/s.
- Delivery to connected sessions: p99 763 ms over 8 tips.
- First job: p99 16 ms over 3,581 connections.
djh58
added a commit
that referenced
this pull request
Sep 28, 2026
…, and a storm-window entry check (#521) (#559) Presets are renamed for what they measure: - throughput-20k-window-1fe[-500-addresses], from d1-20k[-realistic]; - throughput-{200,400,500}k-window-{1,2,4}fe-{async,sync}, from #473's d1-473 cells; - tip-delivery-2000-miners-400k-2fe-retarget[-500-addresses], from tip-275[-realistic]. The 500-address variant is now manual; - mainnet-shape-{130,650,2600}-addresses, from mainnet-floor, growth-5x and growth-20x; - rental-churn-bursts-and-storms; - pr-smoke. Their flags are unchanged, and each description keeps its issue references. The old names still select their presets for one release: presets/aliases.txt is read by the matrix planner (the dispatch preset input) and by prism-load-run.sh, each with a deprecation warning. The nightly matrix builds once. The plan job pins the ref to one commit. A single job builds the release server, harness and gate there, and ships them with their Cargo dep-info. Each preset job checks out that commit and unpacks the binaries into target/release, so the harness still ties the server to the checkout. It no longer installs Rust or builds. With more than one reconnect storm, --storm-reconnect-seconds must now be shorter than --storm-interval-seconds. Otherwise a storm could pick sessions the previous one left offline, whose closes the client ignores, and overstate its drops (#539 review). Refs #521 Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Sep 29, 2026
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.
Refs #521 (Dan's connection-churn requirement for the nightly load harness, on top of #536).
Why
Production does not hold a fixed set of sessions. Hash rental arrives as a burst of sessions that connect within seconds, mines for a heavy-tailed lifetime, and leaves by dropping its sockets. A rental failing over between pools drops and reconnects many sessions at once. Mainnet does not record connection velocity (there is no session table, and connects are not logged), so this is a seeded parameter sweep. Every parameter is a flag, every flag defaults to off, and a preset pins them all.
What
--churn-secondsadds a side phase,churn: afterslow_database, or after warm-up under--plan tips. It runs with no proxy delay and outside the capacity artifact. Its plan is generated once from--seed:Ksessions connecting within a window, mining for the heaviest address at--rental-hashratetimes a mean session (vardiff difficulty accordingly)--rental-bursts(a list such as100,500,2000, orpareto:/lognormal:draws;count=n),--rental-burst-window-seconds,--rental-burst-interval-seconds,--rental-hashratechurn close)--rental-lifetime--reconnect-storms,--storm-interval-seconds,--storm-reconnect-seconds--churn-tips,--churn-rateno_response_commitswithchurn_closed: true. It is never counted as an ACK/commit divergence.--sessionsplus every rental the bursts could connect.Report. A new
churnblock holds:time_to_first_jobfor new connections (rental arrivals and storm reconnects), measured from the attempt;tip_deliveryper churn tip, over the sessions connected at the tip: served, left before served (excluded), and unserved.The run-wide
time_to_usable_workis restricted to the run's own--sessions. Before, a rental connecting later counted its first job on a still-current warm-up tip.Gates and presets.
churn_tip_last_notify_p99_budget_msandnew_session_first_job_p99_budget_ms.rental-churnpreset runs nightly on 8 vCPU. It takes the mainnet-floor population in a tips plan, then 300 s of churn: bursts of 100, 500 and 2,000 sessions within 10 s, Pareto(1.2) lifetimes from 30 s, storms of 10%, 25% and 50%, and 8 tips. It is gated on reconciliation, connected-at-tip p99 3 s and first-job p99 10 s. No workflow change is needed: the nightly matrix is read from the presets.Verification
cargo fmt --checkandcargo clippy -p qbit-prism-load --all-targets -D warningsare clean.qbit-prism-loadtests pass: 136 harness, 21 realism/preset/gate, 6 new churn unit tests (parsing and refusals, plan determinism, bursts, lifetimes, storms, the connection cap, connected-at-tip delivery over synthetic timelines, churn gates), quorum, and the smoke test.rental-churnrun (release builds, private PostgreSQL 16 with fsync on, a shared development host, so indicative): PASS.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.