Skip to content

Instrument TCP write backpressure - #135

Open
noise64 wants to merge 3 commits into
mainfrom
gol-360-tcp-write-backpressure
Open

Instrument TCP write backpressure#135
noise64 wants to merge 3 commits into
mainfrom
gol-360-tcp-write-backpressure

Conversation

@noise64

@noise64 noise64 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add private, feature-gated P2/P3 profiling for JavaScript write/writev batching, drain/completion events, native socket crossings, copied/completed bytes, P2 capacity waits, P3 write-all work, and wasi:http outgoing bodies
  • add a direct/corked runtime matrix spanning 4 KiB, 64 KiB, 64 KiB + 1, and 1 MiB writes while preserving ordinary-feature runtime coverage in a distinct component artifact
  • record the measured ownership boundary without selecting a speculative production mitigation

Measurements

  • the large-buffer marker completes in roughly 54–63 seconds, with host-facing socket delivery dominating both previews
  • the pipe marker takes roughly 91–97 seconds while its 5 MiB wasi:http body write completes in milliseconds, placing most wall time outside that transport path
  • increasing the receiver request size reduced crossings but regressed P2 wall time, so that experiment was reverted

Validation

  • exact-SHA CI passed all 37 executed checks, including all P2/P3 runtime groups and node-compat shards
  • independent Codex and Claude delta reviews found no high- or medium-severity regression
  • the slow buffer and pipe vendored cases remain measured known gaps because longer per-entry timeouts would add excessive concurrent-CI wall time
  • node-compat counts remain unchanged: primary CI-enforced 3174/4387 (72.4%); full public 3174/5750 (55.2%)

Boundary and next action

This PR is the reviewable instrumentation/research tranche for GOL-360; it does not claim the production throughput fix. The measurements require a truthful host-facing progress/backpressure contract before GOL-389 timeout semantics can distinguish an advancing native write from a stall. No batching, timeout, retry, or production scheduling change is included.

@blacksmith-sh

This comment has been minimized.

@noise64

noise64 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Cycle-2 candidate 6cf399ff9b88ed4bf7c2e12e62562f20e9402f93 is now pushed.

  • Codex delta review: clear; shared-target collision and timeout-deferral evidence resolved.
  • Claude Opus delta confirmation: clear; no high/medium regressions.
  • P2 runtime group 8: 54/54 passed, including the profiling matrix and ordinary HTTP lifecycle cases.
  • P3 runtime group 8: 54/54 passed with the same coverage.
  • Both lanes confirmed distinct ordinary and profiling component artifacts, closing the prior collision.
  • Formatting, DTS currentness, node-compat report currentness, ordinary P2/P3 guards, profiling P2/P3 guards, and introduced-lint isolation pass.

The earlier CI failures belong to 0cec3780 and were caused by feature-off registration of the private bridge method; the pushed candidate fixes that compile failure.

Uninstrumented controls were P2/P3 large Buffer 55.821s/55.566s and pipe 91.377s/91.148s. The P3 pipe profile completed the 5 MiB wasi:http body in one write_all in 12.255ms in one run and 6.629ms in the final diagnostic run, while total fixture time remained 92-97s. The slow Buffer and pipe cases therefore remain measured known gaps based on concurrent-CI cost and reliability, not a fixed timeout limitation. No production batching, retry, timeout, or scheduling mitigation is claimed by this draft.

@noise64

noise64 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Exact-SHA readiness gates are complete for 6cf399ff9b88ed4bf7c2e12e62562f20e9402f93.

  • all 37 executed CI checks passed, including every P2/P3 runtime group and node-compat shard;
  • P2/P3 runtime group 8 passed in 11m21s/11m16s;
  • the post-push Claude delta confirmation completed with verdict clear and no new high/medium regressions;
  • release/publish and [code]smith were expected skips.

The draft is technically ready for maintainer review; no CI reruns or readiness-state mutation were performed.

@noise64
noise64 marked this pull request as ready for review August 29, 2026 22:20
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