Tune bounded receive windows against the paced product workload #80

Open
opened 2026-10-04 18:56:16 +00:00 by kayg · 5 comments
Owner

Problem and evidence

The production browser stream defaults to a 256 KiB receive window and coalesces CREDIT for up to 6 ms (packages/stream/src/index.ts:3-13, 801-822); protocol caps are 4 MiB per channel and 8 MiB per connection. With 306 Docker and 306 Podman fixtures, remote Docker 32 MiB exec output measured 16.381 / 29.793 / 33.460 MiB/s at 256 KiB / 1 MiB / 4 MiB windows (load1 roughly 25–34). A lower-load byte-exact PTY cross-check measured remote Docker 18.141→43.451 MiB/s and Podman 23.595→67.354 MiB/s at 256 KiB→1 MiB (load1 11.10–11.82).

See named-stream-output.svg, pty-summary.json and pty-batched.json.

Recommendation

Test a bounded adaptive 512 KiB–1 MiB receive window and return credit before depletion, while respecting control-frame limits and aggregate direction caps. Measure per-stream RSS and concurrent streams; do not allocate 4 MiB for every channel by default.

Payoff, effort and risk

Expected gain: the measured remote Docker exec path improved 1.82× at 1 MiB and 2.04× at 4 MiB; the lower-load exact PTY cross-check improved 2.40× for Docker and 2.85× for Podman at 1 MiB.
Quick win vs deeper change: bounded window experiment ≤½ day; accepted policy plus per-stream and aggregate memory checks is deeper, estimated 1–2 days.
Risk: medium; larger reservations may raise RSS or starve control frames under concurrency.

Priority: Now (≤1 day for the experiment).

2026-10-04 owner decisions: Matches performance-first and the custom v1 WebSocket protocol. Retain the 8 MiB aggregate and 4 MiB channel limits; no new stream path. Related: #60.

Report: perf-audit report
Source: perf-audit 2026-10-04

## Problem and evidence The production browser stream defaults to a 256 KiB receive window and coalesces CREDIT for up to 6 ms (packages/stream/src/index.ts:3-13, 801-822); protocol caps are 4 MiB per channel and 8 MiB per connection. With 306 Docker and 306 Podman fixtures, remote Docker 32 MiB exec output measured 16.381 / 29.793 / 33.460 MiB/s at 256 KiB / 1 MiB / 4 MiB windows (load1 roughly 25–34). A lower-load byte-exact PTY cross-check measured remote Docker 18.141→43.451 MiB/s and Podman 23.595→67.354 MiB/s at 256 KiB→1 MiB (load1 11.10–11.82). See [named-stream-output.svg](/mnt/hdd/infraternal/jobs/perf-audit/named-stream-output.svg), [pty-summary.json](/mnt/hdd/infraternal/jobs/perf-audit/pty-summary.json) and [pty-batched.json](/mnt/hdd/infraternal/jobs/perf-audit/pty-batched.json). ## Recommendation Test a bounded adaptive 512 KiB–1 MiB receive window and return credit before depletion, while respecting control-frame limits and aggregate direction caps. Measure per-stream RSS and concurrent streams; do not allocate 4 MiB for every channel by default. ## Payoff, effort and risk **Expected gain:** the measured remote Docker exec path improved 1.82× at 1 MiB and 2.04× at 4 MiB; the lower-load exact PTY cross-check improved 2.40× for Docker and 2.85× for Podman at 1 MiB. **Quick win vs deeper change:** bounded window experiment ≤½ day; accepted policy plus per-stream and aggregate memory checks is deeper, estimated 1–2 days. **Risk:** medium; larger reservations may raise RSS or starve control frames under concurrency. **Priority:** Now (≤1 day for the experiment). **2026-10-04 owner decisions:** Matches performance-first and the custom v1 WebSocket protocol. Retain the 8 MiB aggregate and 4 MiB channel limits; no new stream path. Related: #60. **Report:** [perf-audit report](/mnt/hdd/infraternal/jobs/perf-audit/report.md) Source: perf-audit 2026-10-04
Author
Owner

Started perf-logs-windows, sole writer in /mnt/hdd/infraternal/wt-lp/perf-logs-windows. Branch perf-logs-windows; base/head 173525d835. Scope: log decoder allocations and measured bounded receive-window policy; preserve #77 batched credit and revocation deadlines. Will run targeted stream/decoder tests, throughput and 32 MiB remote-upload regression, then INFRATERNAL_VERIFY_RUN_ID=perf-logs-windows scripts/verify fast; no merge gate or push. Reading audit scripts and searching for missing perf-test-vm workflow; dev-VM diagnostics will be explicitly distinguished from perf-test-VM certification.

Started perf-logs-windows, sole writer in /mnt/hdd/infraternal/wt-lp/perf-logs-windows. Branch perf-logs-windows; base/head 173525d8358a2576e681576605a7a7c5f1b9ebdd. Scope: log decoder allocations and measured bounded receive-window policy; preserve #77 batched credit and revocation deadlines. Will run targeted stream/decoder tests, throughput and 32 MiB remote-upload regression, then INFRATERNAL_VERIFY_RUN_ID=perf-logs-windows scripts/verify fast; no merge gate or push. Reading audit scripts and searching for missing perf-test-vm workflow; dev-VM diagnostics will be explicitly distinguished from perf-test-VM certification.
Author
Owner

Window experiment uses the existing simultaneous browser workload: 500+ echo round trips while a nonbursting FIFO emits four 16,001-byte lines per 1,100 us (~55.489 MiB/s nominal). Three alternating trials per 256 KiB / 512 KiB / 1 MiB setting, embedded/remote Docker and rootless Podman; real release server, enrolled mTLS infraternal agent, actual source byte/time counters and loaded RSS. The shared benchmark now defaults to product windows rather than hardcoding 4 MiB; optional override is only for measured experiments. CREDIT remains globally coalesced at 6 ms; no server/native credit, signing, audit or authorization-path change.

Source inspection: StreamService uses 64 global / 4 per-user client upgrades; each direction keeps the 8 MiB connection budget. The 500-host / 20,000-container inventory goal must not be modeled as one always-open log subscription per container. Final memory math and selected setting follow the measurements.

Window experiment uses the existing simultaneous browser workload: 500+ echo round trips while a nonbursting FIFO emits four 16,001-byte lines per 1,100 us (~55.489 MiB/s nominal). Three alternating trials per 256 KiB / 512 KiB / 1 MiB setting, embedded/remote Docker and rootless Podman; real release server, enrolled mTLS infraternal agent, actual source byte/time counters and loaded RSS. The shared benchmark now defaults to product windows rather than hardcoding 4 MiB; optional override is only for measured experiments. CREDIT remains globally coalesced at 6 ms; no server/native credit, signing, audit or authorization-path change. Source inspection: StreamService uses 64 global / 4 per-user client upgrades; each direction keeps the 8 MiB connection budget. The 500-host / 20,000-container inventory goal must not be modeled as one always-open log subscription per container. Final memory math and selected setting follow the measurements.
Author
Owner

Perf-test-VM certification is unavailable in this job: .claude/skills/perf-test-vm/SKILL.md is missing, and the skill was not found in the local Codex/Claude skill locations. No remote perf-test VM workflow or connection contract is available. Continuing the authorized implementation, real-service regressions and explicitly labeled Debian dev-VM diagnostics; no absolute performance certification or threshold relaxation is claimed. The integration lead must run the perf-test-VM A/B and independent review before merging.

Perf-test-VM certification is unavailable in this job: .claude/skills/perf-test-vm/SKILL.md is missing, and the skill was not found in the local Codex/Claude skill locations. No remote perf-test VM workflow or connection contract is available. Continuing the authorized implementation, real-service regressions and explicitly labeled Debian dev-VM diagnostics; no absolute performance certification or threshold relaxation is claimed. The integration lead must run the perf-test-VM A/B and independent review before merging.
Author
Owner

Initial paced-window run returned 12 valid trials, then stopped on OPEN_ERR not_found for a newly created fixture before inventory publication. Cleanup completed. Added an observed inventory-publication fence using the existing harness and load1 <=10 admission before each timing trial; incomplete matrix retained separately and will not supply final medians.

The initial embedded Docker trials show why throughput alone is insufficient: medians 17.821 / 27.983 / 40.935 MiB/s at 256 KiB / 512 KiB / 1 MiB, with echo p99 23.3 / 33.2 / 41.3 ms. Source emitted ~50–54 MiB/s; peak server RSS <=36.719 MiB. Several initial trials reached load1 >10 and are diagnostic only. A blanket larger log default is not justified by these results; final policy must avoid adopting a known echo regression.

Initial paced-window run returned 12 valid trials, then stopped on OPEN_ERR not_found for a newly created fixture before inventory publication. Cleanup completed. Added an observed inventory-publication fence using the existing harness and load1 <=10 admission before each timing trial; incomplete matrix retained separately and will not supply final medians. The initial embedded Docker trials show why throughput alone is insufficient: medians 17.821 / 27.983 / 40.935 MiB/s at 256 KiB / 512 KiB / 1 MiB, with echo p99 23.3 / 33.2 / 41.3 ms. Source emitted ~50–54 MiB/s; peak server RSS <=36.719 MiB. Several initial trials reached load1 >10 and are diagnostic only. A blanket larger log default is not justified by these results; final policy must avoid adopting a known echo regression.
Author
Owner

perf-logs-windows — #83 / #80

Head: 79b211653663437edae7968aaa82a4507d14648a. Branch: perf-logs-windows. Base: 173525d8358a2576e681576605a7a7c5f1b9ebdd. Three logical commits; no push, merge gate, issue closure, other AI agents or systemd units.

Changes

The log decoder reuses its 13-byte header DataView. Two uint32 words replace per-record BigInts; only nonzero exact 53-bit timestamps become numbers, with unsafe uint64 values still null. Split headers/bodies and UTF-8 behavior remain bounded and covered by tests.

TypeScript declares 1 MiB output receive windows for exec/SSH and keeps logs/events/stats at 256 KiB. OPEN always carries the same size reserved locally; Rust omitted-field defaults and native input windows remain 256 KiB. The six-ms connection-wide CREDIT scheduler, #77 native input batching, signing, audit, authorization and Rust stream paths are unchanged. The simultaneous benchmark now uses actual product defaults rather than a hardcoded 4 MiB log window.

Decoder allocation A/B

Chromium sampled decoder allocations: 32,656,644 → 23,933,944 bytes, 26.71% lower, medians of three alternating trials. Each trial: 100,000 records at 10,000 lines/s, 99-byte bodies + 13-byte headers, 100 records/feed, about 10 seconds. All retain exactly 10,000 lines / 990,000 body bytes and zero partial records. Load1 3.56–4.77.

The profiler samples at 1,024 bytes and includes objects collected by both major and minor GC; numbers are estimates, not exact allocation counts. JavaScript objects live inside V8 and cannot be attributed by native dhat/heaptrack. This uses the appropriate Chromium heap profiler instead. No browser rendering/frame-time improvement is claimed.

Reproduce: bun e2e/remote/log-decoder-bench.ts BASE_SOURCE packages/web/src/lib/log-stream.ts; extract BASE_SOURCE with git show 173525d:packages/web/src/lib/log-stream.ts. Raw: decoder-ab.jsonl. Method: Chromium HeapProfiler; timestamp semantics: ECMAScript safe integers and uint32 DataView reads.

PTY capacity A/B

Three trials per path/window, 32 MiB batched native PTY output, six-ms credit return; exact byte counts and exit status checked in all 36 trials. MiB/s below measures first-to-last DATA, excluding OPEN and the source’s final one-second sleep. Server/native Rust is identical to the base. Load1 3.68–5.14. These are protocol capacity diagnostics, not xterm ingestion certification.

Path 256 KiB 512 KiB 1 MiB
embedded docker 39.505 79.169 125.890
remote docker 37.625 74.439 108.586
embedded podman 39.096 79.080 157.626
remote podman 36.652 73.828 145.488

Raw: pty-batched.json, pty.log, pty-batched.ts adapted from the audit with this worktree’s harness, release binary, owned label and 512 KiB comparison. Batched source code is /mnt/hdd/infraternal/jobs/perf-audit/terminal-source.c.

Paced simultaneous workload and policy choice

The source targets 55.490 MiB/s (four 16,001-byte lines per 1,100 us), with no catch-up bursts; every successful trial includes at least 500 browser echo samples. It uses the existing browser workload through the real release server and enrolled mTLS infraternal agent, with the current TypeScript client bundled for the browser. Actual source throughput was also measured. Real rootful Docker and rootless Podman; fixture log-file cap 1 MiB matches the existing paced benchmark.

The controlled window experiment completed nine embedded Docker and three remote Docker trials before a between-trial host_offline refusal. An earlier run stopped on a newly created fixture’s not_found; its higher-load results are excluded from the controlled table. Neither partial run is presented as a complete provider matrix. Inventory-publication/load admission fences were added to the diagnostic; final policy timing trials additionally assert no tunnel-generation replacement.

Controlled embedded Docker 256 KiB 512 KiB 1 MiB
Logs MiB/s 23.476 40.338 53.810
Echo p99 ms 8.900 11.200 18.900

Controlled window load1 2.17–7.66. Larger log windows improve throughput but systematically worsen echo. They are not adopted. Standalone PTY gains justify the 1 MiB terminal window; larger terminal credit does not add source batching or relax admission.

The complete chosen-policy A/B has three alternating trials per setting/path: old explicit 256 KiB for both channels versus product defaults (256 KiB logs / 1 MiB terminals). All 24 timing trials preserve the tunnel generation. Actual source emitted 38.961–55.165 MiB/s; load1 1.84–9.96.

Path Logs MiB/s before → after Echo p99 ms before → after
embedded docker 21.858 → 22.789 10.300 → 9.600
remote docker 19.872 → 19.657 13.900 → 15.800
embedded podman 3.284 → 3.352 14.300 → 15.600
remote podman 3.155 → 3.378 19.400 → 23.600

Peak sampled server RSS (10-ms sampling) was 38.273 MiB. After warming, eight real simultaneous 1 MiB log overrides showed server RSS 38.273 → 38.273 MiB; the ninth OPEN was refused, all CLOSE acknowledgments arrived and a replacement OPEN succeeded. This is a warm RSS observation, not zero allocated bytes or an exact unsampled peak.

Performance certification remains blocked: logs are below 50 MiB/s, multiple echo paths exceed both the 5-ms absolute and 10-ms dev criteria, and final remote echo medians are higher than baseline. Shared-load dev results do not establish an acceptable echo regression or justify relaxing thresholds. The rootless source did not sustain the nominal target in every trial. This job does not certify the simultaneous budget or recommend merging on the fast gate alone. Run the exact candidate/base A/B on the perf-test VM before merge; the required perf-test-vm skill/connection workflow is unavailable locally. Rendering-frame and xterm-ingest budgets were not measured.

Raw controlled experiment: windows-controlled-partial.json; final matrix: final-policy/windows.json; runnable diagnostic: e2e/remote/window-bench.ts. STREAM_WINDOWS=262144,0 reproduces the old/default comparison (0 selects per-kind defaults). The default script setting compares 256 KiB / 512 KiB / 1 MiB explicitly. Set INFRATERNAL_E2E_BINARY to the built release binary and INFRATERNAL_ARTIFACT_DIR to a private artifact directory.

Memory math at 500 hosts / 20,000 containers

  • Maximum per channel: 4 MiB; maximum per connection: 8 MiB in each direction. No increase.
  • Default terminal pair: 1 MiB output + 256 KiB native input. Eight default terminals use 8 MiB output and 2 MiB native-input reservations. Default logs use 256 KiB; 32 fit in one client connection. Mixed channels share the same budget.
  • Existing admission: 64 client connections globally / four per user. Therefore at most 512 default terminal or 2,048 default log attachments globally, and 32 terminals / 128 logs per user. Global permitted payload is at most 64 × 8 MiB = 512 MiB per client direction (32 MiB per user), at most 1 GiB for both directions. This counts credit, not socket buffers, queue metadata, retained strings or replay.
  • Tunnel caps stay 8 MiB per direction shared across clients/providers. They are not new allocations per host or multiplied by container inventory.
  • One default log subscription on each of 500 hosts reserves 125 MiB output; 20,000 subscriptions would require 4,882.8125 MiB and cannot be admitted under the existing limits. Demand-driven inventory rows reserve no stream windows. Do not assume all 20,000 containers are streamed simultaneously.
  • Log retention remains 10,000 lines / 4 MiB, split body ≤64 KiB. Native 8 KiB reads / 32-slot output pumps and replay admission are unchanged.

Correctness and verification

  • Decoder: 1 Vitest file / 8 tests pass; safe/unsafe uint64 boundaries, all header split positions, UTF-8 split at every byte, empty body, reset, retention and high-rate credit flood.
  • Stream: 4 Vitest files / 78 tests pass (76 existing plus policy/wire-reservation tests). Existing flow-control and protocol failure tests remain intact.
  • TypeScript stream check and Svelte check pass (zero web errors/warnings).
  • 36 PTY capacity transfers: all 32 MiB, expected byte count and exit 0.
  • Four SHA-256 32 MiB stdin transfers: embedded/remote Docker and rootless Podman, expected digest and exit 0; original 256 KiB input window and native batched-credit bounds retained, with 1 MiB declared output. All preserve the tunnel generation.
  • Four pending-upload authorization withdrawals: audited forbidden CLOSE received in 3.426 / 93.112 / 86.855 / 46.989 ms, all within C+850 ms. Owned physical tunnel stop: audited host_offline in 2.699 ms. Raw: upload-regression.log; driver is the existing binary-stream regression adapted only for label/output directory, 32 MiB selection and 1 MiB output declaration.
  • All throwaway containers labelled infraternal.test=perf-logs-windows; final Docker/Podman label queries return no IDs. No other fixtures removed.
  • Source graph rebuilt/updated; impact review covered the decoder, client, benchmark consumers and tests. No independent reviewer was launched (job explicitly forbids delegation); orchestrator owns independent review.

The first fast-gate attempt failed the package-import declaration check because the allocation script was placed under packages/web. Moving it to the root-owned e2e directory uses the existing Playwright declaration without adding a dependency. Final fast result follows.

Final gate

PASS (exit 0): INFRATERNAL_VERIFY_RUN_ID=perf-logs-windows scripts/verify fast. Never ran verify merge.

Verbatim gate output:

PASS fast: migrations are append-only (0.167s)
PASS fast: workspace package dependencies (0.249s)
PASS fast: gate target-directory and launch diagnostics tests (0.292s)
PASS fast: JavaScript dependencies (1.769s)
PASS fast: advisory review policy tests (0.184s)
SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows
SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2
SUPPLY_CHAIN_NOTICES match THIRD_PARTY_NOTICES.md from 81 frontend packages
SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files
SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review
advisories ok
SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data
licenses ok
SUPPLY_CHAIN_RUST_LICENSES passed
bun audit v1.4.2 (744846f84)

cookie@0.6.0
  workspace:@infraternal/web > @sveltejs/kit > cookie
  low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x

1 vulnerability (1 low)

  bun audit fix           upgrade the vulnerable packages within their ranges
  bun audit fix --latest  also cross major versions
SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only
SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only
PASS fast: supply-chain checks (3.642s)
PASS fast: build web app (7.261s)
PASS fast: cargo fmt --check (1.480s)
PASS fast: cargo clippy (150.448s)
PASS fast: cargo test (266.336s)
PASS fast: svelte-check (19.532s)
PASS fast: UI package svelte-check (8.956s)
PASS fast: stream package typecheck (10.648s)
PASS fast: Vitest (9.145s)
PASS fast: UI package Vitest (10.435s)
PASS fast: stream package Vitest (2.760s)
PASS fast: OpenAPI and TypeScript client drift (75.182s)
PASS fast: terminal TypeScript (1.956s)
PASS fast: terminal Vitest (1.135s)
# perf-logs-windows — #83 / #80 Head: `79b211653663437edae7968aaa82a4507d14648a`. Branch: `perf-logs-windows`. Base: `173525d8358a2576e681576605a7a7c5f1b9ebdd`. Three logical commits; no push, merge gate, issue closure, other AI agents or systemd units. ## Changes The log decoder reuses its 13-byte header DataView. Two uint32 words replace per-record BigInts; only nonzero exact 53-bit timestamps become numbers, with unsafe uint64 values still null. Split headers/bodies and UTF-8 behavior remain bounded and covered by tests. TypeScript declares 1 MiB output receive windows for exec/SSH and keeps logs/events/stats at 256 KiB. OPEN always carries the same size reserved locally; Rust omitted-field defaults and native input windows remain 256 KiB. The six-ms connection-wide CREDIT scheduler, #77 native input batching, signing, audit, authorization and Rust stream paths are unchanged. The simultaneous benchmark now uses actual product defaults rather than a hardcoded 4 MiB log window. ## Decoder allocation A/B Chromium sampled decoder allocations: **32,656,644 → 23,933,944 bytes**, **26.71% lower**, medians of three alternating trials. Each trial: 100,000 records at 10,000 lines/s, 99-byte bodies + 13-byte headers, 100 records/feed, about 10 seconds. All retain exactly 10,000 lines / 990,000 body bytes and zero partial records. Load1 3.56–4.77. The profiler samples at 1,024 bytes and includes objects collected by both major and minor GC; numbers are estimates, not exact allocation counts. JavaScript objects live inside V8 and cannot be attributed by native dhat/heaptrack. This uses the appropriate Chromium heap profiler instead. No browser rendering/frame-time improvement is claimed. Reproduce: `bun e2e/remote/log-decoder-bench.ts BASE_SOURCE packages/web/src/lib/log-stream.ts`; extract BASE_SOURCE with `git show 173525d:packages/web/src/lib/log-stream.ts`. Raw: `decoder-ab.jsonl`. Method: [Chromium HeapProfiler](https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler/#method-startSampling); timestamp semantics: [ECMAScript safe integers](https://tc39.es/ecma262/#sec-number.max_safe_integer) and [uint32 DataView reads](https://tc39.es/ecma262/#sec-dataview.prototype.getuint32). ## PTY capacity A/B Three trials per path/window, 32 MiB batched native PTY output, six-ms credit return; exact byte counts and exit status checked in all 36 trials. MiB/s below measures first-to-last DATA, excluding OPEN and the source’s final one-second sleep. Server/native Rust is identical to the base. Load1 3.68–5.14. These are protocol capacity diagnostics, not xterm ingestion certification. | Path | 256 KiB | 512 KiB | 1 MiB | |---|---:|---:|---:| | embedded docker | 39.505 | 79.169 | 125.890 | | remote docker | 37.625 | 74.439 | 108.586 | | embedded podman | 39.096 | 79.080 | 157.626 | | remote podman | 36.652 | 73.828 | 145.488 | Raw: `pty-batched.json`, `pty.log`, `pty-batched.ts` adapted from the audit with this worktree’s harness, release binary, owned label and 512 KiB comparison. Batched source code is `/mnt/hdd/infraternal/jobs/perf-audit/terminal-source.c`. ## Paced simultaneous workload and policy choice The source targets 55.490 MiB/s (four 16,001-byte lines per 1,100 us), with no catch-up bursts; every successful trial includes at least 500 browser echo samples. It uses the existing browser workload through the real release server and enrolled mTLS infraternal agent, with the current TypeScript client bundled for the browser. Actual source throughput was also measured. Real rootful Docker and rootless Podman; fixture log-file cap 1 MiB matches the existing paced benchmark. The controlled window experiment completed nine embedded Docker and three remote Docker trials before a between-trial `host_offline` refusal. An earlier run stopped on a newly created fixture’s `not_found`; its higher-load results are excluded from the controlled table. Neither partial run is presented as a complete provider matrix. Inventory-publication/load admission fences were added to the diagnostic; final policy timing trials additionally assert no tunnel-generation replacement. | Controlled embedded Docker | 256 KiB | 512 KiB | 1 MiB | |---|---:|---:|---:| | Logs MiB/s | 23.476 | 40.338 | 53.810 | | Echo p99 ms | 8.900 | 11.200 | 18.900 | Controlled window load1 2.17–7.66. Larger log windows improve throughput but systematically worsen echo. They are not adopted. Standalone PTY gains justify the 1 MiB terminal window; larger terminal credit does not add source batching or relax admission. The complete chosen-policy A/B has three alternating trials per setting/path: old explicit 256 KiB for both channels versus product defaults (256 KiB logs / 1 MiB terminals). All 24 timing trials preserve the tunnel generation. Actual source emitted 38.961–55.165 MiB/s; load1 1.84–9.96. | Path | Logs MiB/s before → after | Echo p99 ms before → after | |---|---:|---:| | embedded docker | 21.858 → 22.789 | 10.300 → 9.600 | | remote docker | 19.872 → 19.657 | 13.900 → 15.800 | | embedded podman | 3.284 → 3.352 | 14.300 → 15.600 | | remote podman | 3.155 → 3.378 | 19.400 → 23.600 | Peak sampled server RSS (10-ms sampling) was 38.273 MiB. After warming, eight real simultaneous 1 MiB log overrides showed server RSS 38.273 → 38.273 MiB; the ninth OPEN was refused, all CLOSE acknowledgments arrived and a replacement OPEN succeeded. This is a warm RSS observation, not zero allocated bytes or an exact unsampled peak. **Performance certification remains blocked:** logs are below 50 MiB/s, multiple echo paths exceed both the 5-ms absolute and 10-ms dev criteria, and final remote echo medians are higher than baseline. Shared-load dev results do not establish an acceptable echo regression or justify relaxing thresholds. The rootless source did not sustain the nominal target in every trial. This job does not certify the simultaneous budget or recommend merging on the fast gate alone. Run the exact candidate/base A/B on the perf-test VM before merge; the required `perf-test-vm` skill/connection workflow is unavailable locally. Rendering-frame and xterm-ingest budgets were not measured. Raw controlled experiment: `windows-controlled-partial.json`; final matrix: `final-policy/windows.json`; runnable diagnostic: `e2e/remote/window-bench.ts`. `STREAM_WINDOWS=262144,0` reproduces the old/default comparison (0 selects per-kind defaults). The default script setting compares 256 KiB / 512 KiB / 1 MiB explicitly. Set `INFRATERNAL_E2E_BINARY` to the built release binary and `INFRATERNAL_ARTIFACT_DIR` to a private artifact directory. ## Memory math at 500 hosts / 20,000 containers - Maximum per channel: 4 MiB; maximum per connection: 8 MiB in each direction. No increase. - Default terminal pair: 1 MiB output + 256 KiB native input. Eight default terminals use 8 MiB output and 2 MiB native-input reservations. Default logs use 256 KiB; 32 fit in one client connection. Mixed channels share the same budget. - Existing admission: 64 client connections globally / four per user. Therefore at most 512 default terminal or 2,048 default log attachments globally, and 32 terminals / 128 logs per user. Global permitted payload is at most 64 × 8 MiB = 512 MiB per client direction (32 MiB per user), at most 1 GiB for both directions. This counts credit, not socket buffers, queue metadata, retained strings or replay. - Tunnel caps stay 8 MiB per direction shared across clients/providers. They are not new allocations per host or multiplied by container inventory. - One default log subscription on each of 500 hosts reserves 125 MiB output; 20,000 subscriptions would require 4,882.8125 MiB and cannot be admitted under the existing limits. Demand-driven inventory rows reserve no stream windows. Do not assume all 20,000 containers are streamed simultaneously. - Log retention remains 10,000 lines / 4 MiB, split body ≤64 KiB. Native 8 KiB reads / 32-slot output pumps and replay admission are unchanged. ## Correctness and verification - Decoder: 1 Vitest file / 8 tests pass; safe/unsafe uint64 boundaries, all header split positions, UTF-8 split at every byte, empty body, reset, retention and high-rate credit flood. - Stream: 4 Vitest files / 78 tests pass (76 existing plus policy/wire-reservation tests). Existing flow-control and protocol failure tests remain intact. - TypeScript stream check and Svelte check pass (zero web errors/warnings). - 36 PTY capacity transfers: all 32 MiB, expected byte count and exit 0. - Four SHA-256 32 MiB stdin transfers: embedded/remote Docker and rootless Podman, expected digest and exit 0; original 256 KiB input window and native batched-credit bounds retained, with 1 MiB declared output. All preserve the tunnel generation. - Four pending-upload authorization withdrawals: audited `forbidden` CLOSE received in 3.426 / 93.112 / 86.855 / 46.989 ms, all within C+850 ms. Owned physical tunnel stop: audited `host_offline` in 2.699 ms. Raw: `upload-regression.log`; driver is the existing binary-stream regression adapted only for label/output directory, 32 MiB selection and 1 MiB output declaration. - All throwaway containers labelled `infraternal.test=perf-logs-windows`; final Docker/Podman label queries return no IDs. No other fixtures removed. - Source graph rebuilt/updated; impact review covered the decoder, client, benchmark consumers and tests. No independent reviewer was launched (job explicitly forbids delegation); orchestrator owns independent review. The first fast-gate attempt failed the package-import declaration check because the allocation script was placed under packages/web. Moving it to the root-owned e2e directory uses the existing Playwright declaration without adding a dependency. Final fast result follows. ## Final gate PASS (exit 0): `INFRATERNAL_VERIFY_RUN_ID=perf-logs-windows scripts/verify fast`. Never ran verify merge. Verbatim gate output: ```text PASS fast: migrations are append-only (0.167s) PASS fast: workspace package dependencies (0.249s) PASS fast: gate target-directory and launch diagnostics tests (0.292s) PASS fast: JavaScript dependencies (1.769s) PASS fast: advisory review policy tests (0.184s) SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2 SUPPLY_CHAIN_NOTICES match THIRD_PARTY_NOTICES.md from 81 frontend packages SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review advisories ok SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data licenses ok SUPPLY_CHAIN_RUST_LICENSES passed bun audit v1.4.2 (744846f84) cookie@0.6.0 workspace:@infraternal/web > @sveltejs/kit > cookie low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x 1 vulnerability (1 low) bun audit fix upgrade the vulnerable packages within their ranges bun audit fix --latest also cross major versions SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only PASS fast: supply-chain checks (3.642s) PASS fast: build web app (7.261s) PASS fast: cargo fmt --check (1.480s) PASS fast: cargo clippy (150.448s) PASS fast: cargo test (266.336s) PASS fast: svelte-check (19.532s) PASS fast: UI package svelte-check (8.956s) PASS fast: stream package typecheck (10.648s) PASS fast: Vitest (9.145s) PASS fast: UI package Vitest (10.435s) PASS fast: stream package Vitest (2.760s) PASS fast: OpenAPI and TypeScript client drift (75.182s) PASS fast: terminal TypeScript (1.956s) PASS fast: terminal Vitest (1.135s) ```
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/infraternal-v0#80
No description provided.