Skip to content

feat: arrival co_correct (zrk-style CO correction) + zrk in bench - #45

Merged
vitalics merged 3 commits into
feat/bench-gcannonfrom
feat/arrival-co-zrk
Nov 9, 2026
Merged

vitalics merged 3 commits into
feat/bench-gcannonfrom
feat/arrival-co-zrk

Conversation

@vitalics

@vitalics vitalics commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Stacked on #44 (gcannon) — retarget to main once #44 merges.

arrival.co_correct: true

  • A permit that finds the pool saturated is queued instead of dropped, so a stall shows up as latency in engine_arrival_iteration_ms / engine_arrival_queue_wait_ms (measured from the scheduled start) instead of vanishing into dropped_iterations.
  • The dispatcher spins cooperatively (yield_now) for the last millisecond before each start, so tokio's ~1ms timer granularity no longer reads as queue wait on an idle target.
  • Permit channel is now unbounded (in_flight remains the drop-mode gate); permits still queued at the deadline count as dropped_iterations in both modes.
  • Default stays false (k6-compatible drop semantics). Schema + en/ru docs + skill reference updated; new test arrival_co_correct_queues_instead_of_dropping.

Measured against HttpArena's actix at 10k rps / 1024 conns (macOS host):

p50 dropped
zrk 2.3.0 0.43–0.54 ms 0
perfscale co_correct 0.43–0.45 ms 0
perfscale drop (default) 1.69–1.86 ms 0 / 27 611

Cost: the spin costs ~¼ core at 5k rps (CPU 5.8s vs 3.5s over 9s).

Bench: zrk

  • APPS gains zrk: --closed rows in throughput and saturation.
  • New latency suite (LAT_RATE/LAT_CONNS/LAT_DURATION, default 10000/256/20s): zrk -R vs perfscale-co vs perfscale-drop, CO-corrected p50/p90/p99/max + Dropped + CPU.
  • bench.yml installs the zrk 2.3.0 release binary, verified against SHA256SUMS.txt.

Local smoke run (SUITES="throughput saturation latency" APPS=zrk, 5k rps): zrk p50 0.15 / p99 1.70 ms, perfscale-co 0.06 / 1.25 ms, perfscale-drop 1.01 / 4.89 ms.

🤖 Generated with Claude Code

vitalics and others added 2 commits November 9, 2026 16:19
`arrival.co_correct: true` queues permits that find the pool saturated
instead of dropping them, so a stall surfaces as latency in
`engine_arrival_iteration_ms` / `engine_arrival_queue_wait_ms` (measured
from the scheduled start) rather than vanishing into dropped_iterations.
The dispatcher also spins cooperatively for the last millisecond before
each start, so tokio's ~1ms timer granularity no longer reads as queue
wait on an idle target (actix @10k rps: p50 1.69ms -> 0.43ms, zrk 0.43ms).

The permit channel is now unbounded (in_flight stays the admission gate in
drop mode), and permits still queued when the workers stop are counted in
dropped_iterations in both modes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Anthropic Claude <noreply@anthropic.com>
zrk (HttpArena's open-model, coordinated-omission-corrected generator)
joins the throughput and saturation tables in --closed mode, like
gcannon. The new `latency` suite holds LAT_RATE req/s (default 10000)
over LAT_CONNS connections for LAT_DURATION and compares latency measured
from each request's scheduled start: zrk -R vs perfscale
`arrival.co_correct: true` vs the default drop-on-saturation arrival,
with a Dropped column for the latter.

bench.yml installs the zrk 2.3.0 release binary (verified against the
release SHA256SUMS.txt) and adds zrk/latency to the default APPS/SUITES.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Anthropic Claude <noreply@anthropic.com>
@strix-security

strix-security Bot commented Nov 9, 2026

Copy link
Copy Markdown

Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Anthropic Claude <noreply@anthropic.com>
@vitalics
vitalics merged commit f6c5e1d into feat/bench-gcannon Nov 9, 2026
2 checks passed
@vitalics vitalics mentioned this pull request Nov 9, 2026
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