DDIR server: park idle workers while waiting for progress - #907
Merged
Merged
Conversation
Server::tick and Server::snapshot repeatedly called Worker::step even when no operator could run. Use Timely's existing step_or_park(None) policy: its brief idle spin absorbs short gaps; remote data/progress wakes parked workers. No new policy knob, API change, or worldgen-specific logic. Co-Authored-By: Astra (OpenAI Codex) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Server::tickandServer::snapshotcalledWorker::stepin a loop even when no operator could run. They now use Timely's existingstep_or_park(None). Its short idle spin covers brief gaps, and remote data or progress wakes a parked worker. There is no new API and no new policy knob. Two files, +46/−2, including a regression test where one peer is delayed.Measured on three workloads: SCC, the worldgen tour, and the stock AoC runner (33 answers). Three paired runs each, order reversed in the middle run, M4 release build, nothing else running. Graph peaks are the server process footprint. AoC times cover the whole runner.
At 4 workers, the CPU ranges separate for all three workloads: SCC 1.62–1.63 → 1.48 s, tour 3.40–3.45 → 2.22–2.26 s, AoC 8.54–8.55 → 2.94 s. Elapsed time moves by at most about 1.4% at the median, and one worker is flat. AoC elapsed improves in every pair.
Slower cases. SCC at 4 workers has a 7.7% higher peak footprint in all 3 pairs, and the ranges do not overlap (76.6–78.4 vs 83.3–87.3 MiB). The case for this change is CPU, not memory. SCC churn is also +1.4% at the median.
Tests.
cargo test --release -p interactive: 105 passed, 5 ignored (all ignored before this change too). All 33 AoC answers match. The supported sessions and the graph references match on both backends.Measurements and the port are by Astra (OpenAI Codex). I re-ran the tests on master-next 9cfc909.
🤖 Generated with Claude Code