W3: plan steps seen sooner, RequiredBy in parallel, pooled tick buffer - #26
Merged
Merged
Conversation
…tick buffer Plan steps (S-6 of the external performance report): the pause between two looks at an entry now doubles from 10 ms up to the 250 ms cadence instead of being a flat 250 ms. On a throwaway machine the same stops and starts went from 260-289 ms per step to 4-71 ms. An entry's wait hint is rounded up to a whole cadence, which is where the flat cadence left it in effect, so looking sooner never turns into giving up sooner. The waiting half of PlanRunner moved to PlanRunner.Waiting.cs. The JSON of a plan keeps its shape, and the milliseconds of each step get smaller. RequiredByPass (S-5): Parallel.For around the existing ReadDependents, each call with its own manager handle, order held by index. 155-167 ms became 19-40 ms over 797 entries on sixteen processors. Status tick (S-3): the enumeration block comes from ArrayPool, cut to the size the manager asked for and cleared, and the reader takes a span. 347 KB became 217 KB allocated per tick, and full collections over 1500 ticks went from 34 to 1. Cost prose that quoted the sequential RequiredBy numbers is brought up to date. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The test that proves the pass really asks several entries at once needs the thread pool to hand it a second thread. On the build agent, with the rest of the core tests running beside it, that thread never came within ten seconds and the test failed although the pass was parallel. The class now runs in a collection with parallelization disabled, the same answer ReadAllContractTests gave to the same problem, and the wait is twenty seconds, which only counts when the test fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The header said whether the pass still earns its own family was an open question. It was answered the same day: it stays asked for, and the listing, the JSON of list and the snapshot keep their shape. Co-Authored-By: Claude Opus 5.5 <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.
W3 of the performance series that followed the external report (S-6, S-5 and the narrow part of S-3).
Plan steps are seen sooner (S-6)
The pause between two looks at an entry now doubles from 10 ms up to the 250 ms cadence, instead of a flat 250 ms. The first look still goes straight after the request.
Measured on a throwaway Windows Server 2025 machine, elevated, 8 processors, five warm cycles:
An entry's wait hint is rounded up to a whole cadence before it becomes a deadline. That is where the flat cadence left it in effect, so a service that promised 50 ms and arrived at 240 ms without raising its check point is still reported as done rather than as timed out. Looking sooner never turns into giving up sooner.
Visible in the JSON of a plan: the
millisecondsof each step get smaller. The shape does not change.Not done, with the reason: holding the manager handle in
WindowsScmControl. One status reading costs 0.19-0.23 ms, measured unelevated, so the saving is below the sleep granularity of Windows.RequiredBy asks several entries at once (S-5)
Parallel.Foraround the existingReadDependents, each call with its own manager handle (a shared handle measured slower), order held by index. Over 797 entries on 16 processors, unelevated: 155-167 ms one at a time, 19-40 ms after, every answer identical to the sequential one.ConcurrencyGuardscarries the file with its reason.The status tick rents its buffer (S-3, narrow part)
The enumeration block comes from
ArrayPool, cut to the size the manager asked for and cleared, andManagerBlocks.ReadEnumerationBuffertakes a span, so the reader sees the same length and the same zeros as with a new array. Over 1500 ticks: 347 KB allocated per tick became 217 KB, full collections went from 34 to 1, tick time unchanged. The rest of the report's S-3 proposal (a kept buffer with one call, a status walker without display names, a delta) is not done, for reasons in the analysis.Guards
PlanRunCadenceTests: arrival noticed soon (six arrival times), short promises get the patience they always had, a long wait asks the manager about every 250 ms.PlanRunnerTests: the three waiting tests assert ranges instead of multiples of 250 ms.RequiredByPassParallelTests: 400 entries keep their own answers in order against a single-threaded run, and the first two questions really go out together.runs=anywhere24/24, windowColumnFamilyGuards2/2, architecture 182/182. No full suite.🤖 Generated with Claude Code