Repository navigation
feat(task): hold a plateau and probe it again - #216
Draft
greenhat616 wants to merge 2 commits into
Draft
greenhat616 wants to merge 2 commits into
greenhat616 wants to merge 2 commits into
Conversation
A doubling that gains less than 10% no longer stops the growth for the rest of the download. The growth holds the runners it doubled from: it refills up to them by splits and adds nothing while more are active. Once its wait has passed, it probes from the runners active then, at least the hold, by doubling towards the limit: the runners a gainless doubling added may run to the end of the download. A gain resumes the ramp; no gain holds the runners the probe started from and doubles the wait from 30 s up to 300 s. The runners a gainless doubling added are not stopped: they finish their chunks. The growth now tells the limit controller how many connections it wants: all of them while ramping, the hold, or a pending probe's goal. Runners are only created up to that, and a hold above the limit asks for recovery steps. The endgame hedge stays gated by the limit alone. Every pending growth ends at a deadline of the connect timeout plus five grow intervals: a doubling to the limit whose runners never come back is dropped instead of freezing the growth, and a probe is inconclusive. Design notes in §14.33 (D28 to D31, G11); §14.14 and §14.18 mark the permanent plateau as superseded.
The growth bench gains three scenarios. s5_silent_limit_4 runs over HTTP, the reqwest adapter against the limited server of the tests crate, which serves four connections at once and closes or never answers the others; it has its own table of the connections the server turned away and when. s6_plateau_then_more_bandwidth raises the server's bandwidth during a hold, with a new adapter option that raises the total speed limit some time after the first stream. s1_max32_long runs s1_max32 on 256 MiB, long enough for the doubling from 16 to 32 to be judged. The table also counts holds and probes. Design §14.17 has the new numbers in place of the label that marked the old ones as measured before the limit controller.
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.
PR-B of the concurrency window redesign (T31; design §9.2, §14.33; decisions D28–D31). Stacked on #211, which is its base.
Why
DoublingStrategyset aplateauflag after a doubling that gained under 10 %, and never cleared it: the task never probed again when bandwidth came back, and nothing refilled after a plateau (§14.14). A doubling to the limit could also wait without end for runners that could not come back (§14.18).What
feat(task): hold a plateau and probe it againMode::{Ramp, Hold { h, reprobe_at }}replaces the flag. A gainless doubling holds the runner count before it; the hold refills up tohwithout judging.reprobe_at, a probe doubles from the runners active then (D31, confirmed 2026-11-16): baseb = active ≥ h, goalmin(2b, limit_cap), made only if it adds at least⌈b/2⌉, judged by the one-tick 10 % rule against the speed atb. Gain → ramp; no gain → holdb, wait doubled (30 s up to 300 s); inconclusive → wait unchanged.connect_timeout + 5 × GROW_INTERVAL, 40 s by default): an unjudged ramp doubling is dropped, an unjudged probe is inconclusive.wantto the limit controller (max_connectionswhile ramping,hin a hold, the probe's goal while it is pending);cap = min(limit_cap, want, max_connections)andfree = cap.saturating_sub(active).bench(task): add the silent limit and the plateau scenarios:s5_silent_limit_4(Close and Hang),s6_plateau_then_more_bandwidth,s1_max32_long, a full re-run of the table (§14.17).Bench (10 runs each, median)
Other scenarios are within the spread of §14.20.
Not done
⌈b/2⌉room is not probed (Q8).Verification
fmt, clippy
-D warningsandcargo test --workspace --all-featureson each commit (1052 passed, 0 failed, 1 ignored at C41);cargo bench --no-run. Reviewed by codex over four rounds (single backend).