ReviewOS

zig-utils/zig-js

Perf: gate long-running latency, memory plateau, and cleanup

#492
Open chris opened this 8 days ago ·
8 days ago

Parent: #459 Depends on: #460, #461, #480, #491

Goal

Validate sustained throughput, tail latency, memory plateau, code/GC churn, and cleanup under long-running application-shaped workloads.

Scope

  • Add owned deterministic soaks for service-style request loops, module reload, promises/tasks, Workers/Threads, shared graphs, caches, strings/JSON/regex, typed data, Wasm, and mixed allocation survival.
  • Record throughput windows, latency p50/p95/p99/max, GC pauses, compile/deopt/invalidation, queue depth, live/retired code, heap/backing/RSS, file descriptors/threads, and final teardown.
  • Include phase changes that invalidate assumptions, resize memory, rotate modules/realms, vary survival/input size, and apply bounded memory pressure.
  • Compare stable early/late windows and fail on monotonic leak, unbounded queue/cache, compile storm, pause drift, or throughput collapse.
  • Keep full soaks manual/nightly with small deterministic CI witnesses.

No-workaround rules

  • No forced periodic restart, global cache flush that changes public behavior, ignored warmup/leak window, capped input that avoids the boundary, or averaging that hides tail spikes.

Acceptance

  • Workload/metric manifests and acceptance thresholds are derived from checked-in baseline evidence and reviewed before optimization.
  • Each workload reaches a bounded memory/code/thread/resource plateau and exact final cleanup.
  • Tail latency and throughput remain stable across phase changes and GC/code-cache pressure.
  • Failures are reproducible from seed/configuration and integrate with #491 shrinking where possible.
  • Dated reports retain all raw windows and exact revisions/hardware.

Foundation

Existing lifecycle fuzz, mid-GC fuzz, GC generation/compaction, artifact retirement counters, and benchmark publication hygiene.

Sign in to comment on this issue.