Repository navigation
state_exec: the default async step rate is 8000, re-measured after the evaluator speedup - #861
Merged
Merged
Conversation
…e evaluator speedup StepCostSetsTheDefaultRate holds kDefaultAsyncStepsPerCpuMs within a factor of four of what a step costs. Since the evaluator's hot-path work, steps cost a quarter of what the 2000 default was set from, and the test fails on macOS arm64 (2000 vs 2026) and on MSVC x64. On master c0e0b5a (MSVC Release, x64), the async scheduler measures 7,700 to 11,400 steps per CPU ms on a lightly loaded box; a macOS arm64 runner measured 8,100 to 8,700. 8000 rounds that down. The tests that hard-coded counts from 2000 (AS18/AS26, AS21, AS27, pycvc's sleeping call) use the constant instead, and the docs follow. Ariadne's 5000-step action cap now covers 0.625 ms of async kernel CPU.
This was referenced Oct 28, 2026
transfix
added a commit
that referenced
this pull request
Oct 28, 2026
The project version and the cvcpkg recipe family move to 3.7.2. Every recipe is at cvc_revision 1 already, so none restarts. 3.7.2 carries the dynamic plants on the terrain and in a Jolt world, and the four-wheel plant (#869): --plant dynamic and dynamic4w drive the ground, collide with the buildings and each other, and book the collisions. It also carries dyn_4w's port-Hamiltonian form (#850), dyn_bike's wheel-frame front slip (#852), the books goldens for GRL-SNAM's twins (#848, #849), pycvc's drive telemetry (#857) and keep-alives (#864), the macOS SDK's openssl (#846), and the state_exec scheduler and evaluator work (#842, #843, #844, #861, #863).
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.
AsyncCalls.StepCostSetsTheDefaultRatechecks thatkDefaultAsyncStepsPerCpuMsstays within a factor of four of what a step costs in an optimized build. Since #844 made the evaluator faster, it fails. It failed onrecipe / macos-latest / Releaseon #851 (run 40613165503):2000 vs 2026.04. It also fails on the MSVC x64 build the default was measured on.The default was set from steps costing 0.4 to 0.45 CPU µs (2,200 to 2,500 per CPU ms, rounded down to 2000). They now cost about a quarter of that, so the default is stale.
Measured
state_exec_async_calls_test --gtest_filter=AsyncCalls.StepCostSetsTheDefaultRate --gtest_repeat=Non master c0e0b5a, MSVC 19.44 Release, x64, 22 logical cores, 2026-10-28. Other jobs were loading the box, and the load varied between the three batches. Contention on a busy box makes a step cost more CPU time, so the busier batches read lower.The macOS arm64 runner, from #851's failure log, measured 8,104 – 8,676 on both schedulers.
For batches 1 and 3, the "8000 fails" column is computed from the printed rates. With 8000 built in, the test passed 30 of 30 repeats.
The change
kDefaultAsyncStepsPerCpuMsgoes from 2000 to 8000. That is the async scheduler's measured range rounded down, the same rule that set 2000. 8000 is under the macOS runner's rates as well. The factor of four stays.pycvc.i, which is updated to match.STATE_EXEC_EXCEPTIONS.md(the rate's rationale, and the AS-18 and AS-27 rows), the developer guide andARIADNE.md.What it changes for hosts
An async call's CPU time now costs four times as many steps, which is again about what the same CPU time buys in DSL steps. Ariadne's 5000-step action cap now covers 0.625 ms of kernel CPU instead of 2.5 ms; since #844, 5000 DSL steps take about 0.5 ms. A host whose documents call CPU-heavy async verbs raises
ariadne.limits.action_max_steps, asARIADNE.mdalready says. The in-tree async verbs (nav_compute'snav-step,http-get-async) use far less than that.The alternative was to widen the test's factor and keep 2000. That leaves async CPU charged at about a fifth of what DSL steps cost. If you'd rather keep the old charge and the Ariadne caps as they are, say so and I'll switch to that.
Tested
Locally, MSVC Release (no pycvc build here, so pycvc's tests run in CI):
state_exec_async_calls_teststate_exec_scheduler_testariadne_runtime_teststate_exec_exceptions_teststate_exec_gaps_teststate_exec_integration_teststate_exec_evaluator_teststate_exec_data_steps_teststate_exec_stdlib_test