fix(router): adaptive tick converges the mux to the fastest N legs in one tick - #4200
Merged
Merged
Conversation
… one tick Under the mux uncap (adaptStandbyMax=60) the router brings up ~60 legs all born active, and the adaptive tick's proactive-park parked only ONE leg per tick, newest-first. It could never catch up: the active mux hovered 25-30 wide across latencies from <1ms to >1s, and the no-skip reorder buffer head-of-line- stalled on the slowest active leg (measured live: 335 bytes took 22s over a 28-wide idle mux; a 10MB download stalled out entirely). Two changes, both driven by the LIVE end-to-end route latency (snapshotLegs already sources LegInfo.LatencyMs from legEndToEndLatencyMs, not the stale first-hop transport RTT): - Rule (3) proactive-park now parks the WHOLE surplus above the active target in a single tick, SLOWEST-first, so the set kept active is always the fastest desiredActive legs and the wide idle mux collapses to lean immediately. - Growth (healthyPromotable) now promotes the FASTEST measured-healthy standby instead of the lowest-index one, so a widening download grows onto the fastest reserve legs, never pulling a slow leg in ahead of a fast one. bundle.wasm regenerated (TinyGo); parity_test (wazero) green. New unit test asserts slowest-first bulk park; the warm-standby test now expects the one-tick bulk park.
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.
Under the mux uncap (
adaptStandbyMax=60) the router brings up ~60 legs all born active, and the adaptive tick parked only one leg per tick, newest-first — it could never catch up. The active mux hovered 25-30 wide across latencies from <1ms to >1s, and the no-skip reorder buffer head-of-line-stalled on the slowest active leg (measured live: 335 B took 22 s over a 28-wide idle mux; a 10 MB download stalled out).Two changes, both driven by the live end-to-end route latency (
snapshotLegsalready sourcesLegInfo.LatencyMsfromlegEndToEndLatencyMs, not the stale first-hop transport RTT):desiredActivelegs and a wide idle mux collapses to lean immediately.bundle.wasmregenerated (TinyGo);parity_test(wazero) green. New unit test asserts slowest-first bulk park.