Skip to content

Pacer: app-limited samples, egress cap, tunable rates, stats staleness docs - #11

Merged
stasadance merged 1 commit into
mainfrom
claude/project-thread-3ut2e9
Nov 24, 2026
Merged

stasadance merged 1 commit into
mainfrom
claude/project-thread-3ut2e9

Conversation

@stasadance

@stasadance stasadance commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Fixes review items 14, 16, 17, 18.

Tests

  • Rust: 2 new pacer sims. Rate after a quiet period: 353 KB/s, was 21 KB/s. Goodput in the first 500 ms after resume: 307 KB/s, was 81 KB/s (cap 307 KB/s).
  • e2e: new egress cap test. All pass.

Bench A/B vs main (Chrome, 200 ms RTT, rtc+rack+pace, seeds 4-7, 30 s)

The first version made reliable p95 about 130 ms worse under loss. Loss-recovery samples were being counted as app-limited. Fixed with the cwnd-limited check, and now on par with main:

loss ping p95 (this / main) reliable p95 goodput u/r
0% 202 / 203 102 / 102 27.2/12 vs 27.2/12
2% 322 / 328 828 / 847 17.8/11.8 vs 17.1/12
5% 355 / 374 854 / 840 14.9/12 vs 13.4/11.9

These scenarios have no idle periods, so the app-limited gain only shows in the sims.

…or/burst, stats staleness docs

- App-limited delivery samples (budget not hit, nothing waiting on SCTP cwnd,
  no queue) only enter the max filter when they raise it (BBR-style), so
  quiet periods don't ratchet the rate down. stats().appLimited exposes it.
- egressRate: server-wide token bucket over all peers; unreliable needs
  tokens, reliable always goes. stats().egressDrops counts its drops.
- pacerStartRate, pacerMinRate, pacerBurstMs options (defaults unchanged).
- Document which stats fields are live vs 50 ms / per-sample snapshots.
- accept(): localPort is the bound port again, not the advertise port
  (the bench shaper forwarded to itself and never connected).
@stasadance
stasadance merged commit 08c29cc into main Nov 24, 2026
4 checks passed
@stasadance
stasadance deleted the claude/project-thread-3ut2e9 branch November 24, 2026 01:43
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