Skip to content

fix(perf): harden interop perf for mplex teardown and yamux throughput#1337

Merged
acul71 merged 8 commits into
mainfrom
perf/mplex-fix
Jun 5, 2026
Merged

fix(perf): harden interop perf for mplex teardown and yamux throughput#1337
acul71 merged 8 commits into
mainfrom
perf/mplex-fix

Conversation

@acul71

@acul71 acul71 commented May 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #1344

Summary

  • Harden perf interop shutdown for tcp + tls + mplex so expected connection-closed errors during cleanup no longer fail the test after benchmarks complete.
  • Fix perf listener lifecycle so slow ws + noise + yamux runs are not cut off mid-transfer.
  • Improve yamux GrowTo hysteresis and per-read window updates for large-transfer throughput.
  • Add scripts/perf/run_local_perf.py for local matrix runs and PY_YAMUX_* tuning.

Test plan

  • make lint / make typecheck / yamux hysteresis unit tests
  • ./scripts/perf/run_local_perf.py --quick (tcp+tls+mplex, ws+noise+yamux)
  • CI tox interop + core green

acul71 and others added 3 commits June 5, 2026 03:12
Batch recv release for Go-like GrowTo hysteresis, run autotune on
per-read and partial window updates, and add regression tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent perf listener timeouts during slow ws+yamux runs and stabilize
teardown for tls+mplex interop scenarios.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add scripts/perf/run_local_perf.py for local perf interop runs with
documented PY_YAMUX_* environment tuning knobs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@acul71 acul71 changed the title fix(interop): stabilize perf test teardown and listener timeout fix(perf): harden interop perf for mplex teardown and yamux throughput Jun 5, 2026
acul71 and others added 5 commits June 5, 2026 03:45
Add bugfix and performance release notes for Python perf interop
hardening tracked in issue #1344.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop redundant _connect_redis_with_retry from run(); role runners already
connect. Add unit tests for shutdown classification and env helpers.
Document listener lifecycle and PERF_LOCAL_ADDR_FILE in interop README.

Co-authored-by: Cursor <cursoragent@cursor.com>
Route [YAMUX_PERF] traces through logger.debug and shorten in-module
PY_YAMUX_* documentation; full tuning guide lives in scripts/perf/README.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
Detect dialer via first perf stream when get_live_peers is empty on
ws+mplex, extend teardown idle for that stack, and filter loopback
listenaddrs plus connmgr deny_list so 1:1 perf runs stay stable.

Co-authored-by: Cursor <cursoragent@cursor.com>
interop/perf/perf_test.py imports redis; tests/interop/perf loads it
at collection time. Match interop/perf/pyproject.toml constraint.

Co-authored-by: Cursor <cursoragent@cursor.com>
@acul71 acul71 merged commit 0fa8435 into main Jun 5, 2026
38 checks passed
@acul71 acul71 deleted the perf/mplex-fix branch June 5, 2026 18:57
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.

Harden Python perf interop: mplex teardown, yamux throughput, and perf_test.py reliability

1 participant