Skip to content

fix(router): cap the adaptive active mux at adaptCap even under load - #4206

Merged
0pcom merged 1 commit into
skycoin:developfrom
0pcom:fix/adaptive-cap-active-under-load
Aug 26, 2026
Merged

fix(router): cap the adaptive active mux at adaptCap even under load#4206
0pcom merged 1 commit into
skycoin:developfrom
0pcom:fix/adaptive-cap-active-under-load

Conversation

@0pcom

@0pcom 0pcom commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

The proactive-park was gated on !saturated, so it only trimmed the active set when idle. During the uncap fill the pool establishes hundreds of legs (all born active), and route-setup/keepalive traffic makes the group read as saturated — so the park stayed suppressed and the active set ballooned (observed live: ACTIVE 16→31 while standby froze), HoL-stalling the no-skip reorder buffer.

Two-tier park floor: converge active to the lean steady target when idle, but always cap at adaptCap (the max rule 4 would ever build) even under load — born-active excess is shed slowest-first regardless of saturation, while a real download (already at adaptCap) keeps its legs.

bundle.wasm regenerated; parity_test green; new test covers the cap under sustained saturation.

The proactive-park was gated on !saturated, so it only trimmed the active set
when the group was idle. During the uncap fill the pool establishes hundreds of
legs — all born active — and the route-setup/keepalive traffic makes the group
read as saturated, so the park stayed suppressed and the active set ballooned to
dozens of legs (observed live: ACTIVE climbing 16->31 while standby froze),
head-of-line-stalling the no-skip reorder buffer.

Introduce a two-tier park floor: converge active down to the lean steady target
(desiredActive) when idle, but ALWAYS cap it at adaptCap — the maximum the
saturation-growth rule (4) would ever build — even under load. Legs born active
beyond adaptCap are shed slowest-first regardless of saturation; a real bulk
download already sits at adaptCap, so only born-active excess is parked, never
the legs the download is using.

bundle.wasm regenerated (TinyGo); parity_test green; new test asserts the cap
holds under sustained saturation.
@0pcom
0pcom merged commit a5ef715 into skycoin:develop Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant