test(parallel): verify 1000-session fan-out and extend scaling bench#2120
Merged
Conversation
Captures parallel-vs-sequential, parallel scaling (10/50/100/200 sessions), and shared-Arc-FS results so future runs have a diff baseline. Claude-Session: https://claude.ai/code/session_01D2S512buFBwmYnDzBykbA3
Adds parallel_sessions_tests integration tests proving a 1000-session fan-out actually does real work (correct per-session output, exit 0) and that 500 sessions sharing one Arc<FileSystem> don't cross-contaminate — guarding against the case where sessions error out instantly and the run only looks fast. Extends parallel_execution bench SESSION_COUNTS to 500/1000 and fixes the speedup-summary generator to emit every measured session count instead of a hardcoded list. Refreshes the saved 4-core baseline with the full curve. Claude-Session: https://claude.ai/code/session_01D2S512buFBwmYnDzBykbA3
Keep the first 4-core vm run (200-session cap) alongside the full 10-1000 curve so historical comparisons have every data point. Each run is a distinct timestamped file and is never overwritten. Claude-Session: https://claude.ai/code/session_01D2S512buFBwmYnDzBykbA3
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 275ed71 | Commit Preview URL Branch Preview URL |
Jun 23 2026, 01:52 AM |
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.
What
parallel_sessions_testsintegration suite proving a 1000-session parallel fan-out actually does real work (each session asserts correct per-session output and exit 0), plus a 500-session check that sessions sharing oneArc<dyn FileSystem>don't cross-contaminate.parallel_executionbenchSESSION_COUNTSto 500 and 1000, and fixedscripts/bench-parallel.shto emit a speedup row for every measured session count (was hardcoded to 10/50/100/200).crates/bashkit/benches/results/(timestamped, never overwritten — they accumulate for historical comparison).parallel-execution.mdtying the bench to the new correctness test.Why
The bench used
let _ = bash.exec(...), ignoring results — so a fan-out where every session errored instantly would look fast while doing nothing. These tests close that gap and confirm bashkit scales to 1000 concurrent sessions (sessions are heap objects + tokio tasks, no per-session OS process/thread).How / Findings
Arc-FS throughput inverts above ~500 sessions (140 ms vs 98 ms per-session at 1000) due toRwLockcontention on the single shared VFS.Tests
parallel_sessions_tests::thousand_parallel_sessions_do_real_work✅parallel_sessions_tests::parallel_sessions_shared_fs_no_cross_contamination✅cargo fmt --check,cargo clippy --tests --benches -p bashkit --features http_client,ssh,sqlite -- -D warningsclean.No production code changed — test/bench/tooling only.