Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ Runtime comparison requires Linux because io\_uring and relay process metrics
come from Linux interfaces. The default worker count is the number of logical
CPUs the run may use.

`moq-uring`'s `worker_turns` target also measures QUIC request/reply on one
worker, sweeping 1 or 16 connections against 64 B or 256 KiB replies with
1 or 4 task passes. It prints rounds and counter deltas for turns, passes,
enters and received datagrams, so counts per round can be compared alongside
timing. The existing nightly `rust-shared` group runs these cases.

```bash
nix develop --command cargo bench --locked -p moq-uring --bench worker_turns -- worker_request_reply
```

Measure `moq-uring`'s actual `Local` thread guard separately from I/O:

```bash
Expand Down
5 changes: 4 additions & 1 deletion doc/bin/relay/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ With `--runtime-io-uring`, each QUIC worker also reports `moq_relay_uring_*`
counters under a `worker` label. Datagrams per enter and the SQE/CQE
histograms show whether syscalls carry useful work. Compare turns and
queue-pressure enters with throughput: flushing deferred work can remove
empty busy turns, so enters/turn alone does not grade efficiency. The
empty busy turns, so enters/turn alone does not grade efficiency.
`moq_relay_uring_passes_total` over turns is how many passes over its woken
tasks a turn runs; a ratio near the default budget of 4 shows heavy use of
the pass budget but does not prove that work spilled into the next turn. The
histograms include empty enters. A dead worker shows stuck zeros rather than
disappearing.

Expand Down
7 changes: 2 additions & 5 deletions quest/m2/perf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ Planning quests can settle their contracts independently. Facts from the 2026-09
hot-path survey, so quests don't re-litigate them:

- Decided in the 2026-10-05 audit: perf quests that edit moq-uring's QUIC
driver (Run to quiescence) measure their before and after on `moq-quic`.
- `moq-uring`'s only backend is `moq-quic`. Every profile names its backend. The
historical quiche-flavor numbers cited in
[Run to quiescence](/quest/m2/perf/uring-quiescence.md) are re-measured on `moq-quic`.
driver measure their before and after on `moq-quic`.
- `moq-uring`'s only backend is `moq-quic`. Every profile names its backend.
- Cross-thread wakeups are already cheap: one futex word per worker, at most
one `futex(FUTEX_WAKE)` per park cycle, wake bursts coalesce through the
`kio::Tasks` bitset. No eventfd, no MSG_RING, by design (`SINGLE_ISSUER`).
Expand Down Expand Up @@ -87,7 +85,6 @@ revisions on the same host and worker count, and profiles with
- [Stream transports](/quest/m2/perf/stream/README.md) - qmux drives its own WebSocket and TCP sockets in one task, measured end to end, then serves them from the io_uring workers
- [Relay allocations](/quest/m2/perf/relay-allocs.md) - fewer allocations per delivered frame, starting with per-stream session clones
- [QUIC lock contention](/quest/m2/perf/quic-lock-contention.md) - a measured verdict on the tokio driver's connection-wide mutex and per-packet endpoint-to-connection hop, with levers built only on evidence
- [Run to quiescence](/quest/m2/perf/uring-quiescence.md) - a received packet's reply is staged in the same turn, under a pass and train budget that keeps the fairness rule
- [Ingest batch](/quest/m2/perf/ingest-batch.md) - relay ingest pays one lock, wake, and clock read per burst of whole frames instead of per frame
- [Streaming frame read owners](/quest/m2/perf/frame-read-owners.md) - readers of a frame still arriving share one byte owner per publication instead of allocating one each per read
- [kio waiter costs](/quest/m2/perf/kio-waiter-costs.md) - long-lived waiters stop being rebuilt every poll, IETF fetch keeps one close watch per stream, and a short `kio::log` costs less
Expand Down
63 changes: 0 additions & 63 deletions quest/m2/perf/uring-quiescence.md

This file was deleted.

3 changes: 3 additions & 0 deletions quest/m2/performance-survey/task-capacity.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ chunk must keep its chunk alive or point at nothing. It must also keep
concurrent wakeups, coalescing, snapshot fairness and the rotation order
(`concurrent_wakes_are_never_lost`, `wakes_past_64_chunks_run_in_slot_order`).

The io_uring worker now uses `Tasks::poll_passes`, so its bounded wake chains
repeat that indexed snapshot within one turn.

Follow the [survey's benchmark contract](/quest/m2/performance-survey/README.md):
measure the baseline before optimizing, retain paired evidence, verify
equivalent work, schedule coverage nightly, and accept a measured no-win.
Expand Down
13 changes: 8 additions & 5 deletions quest/m2/uring-bench-followups.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# [XS] Confirm io_uring quiescence on a quiet host and track its turn counts nightly
# [XS] Confirm io_uring quiescence on a quiet host

## Goal

Run-to-quiescence on the io_uring workers has acceptance numbers from a quiet host (fanout CPU per Gbps and p99 from `just bench-runtime`, against the tokio workers), and a QUIC request-reply variant of the `worker_turns` bench gives its turn and enter counts a nightly series, so a regression in batching shows up.
Run-to-quiescence on the io_uring workers has acceptance numbers from a quiet host (fanout CPU per Gbps and p99 from `just bench-runtime`, against the tokio workers).

## Plan

Follow-ups of [moq-dev/moq#7530](https://github.com/moq-dev/moq/pull/7530), which runs a turn's tasks to quiescence before submitting. Its deterministic counts were the evidence (fanout 40.2 to 20.9 turns per round, -3.6% instructions); its `just bench-runtime` rows were indicative only, because host load put every runtime's p99 in seconds and moved the unchanged tokio rows by up to 8%. This waits on #7530 landing.
Follow-ups of [moq-dev/moq#7530](https://github.com/moq-dev/moq/pull/7530), which runs a turn's tasks to quiescence before submitting. Its deterministic counts were the evidence (fanout 40.2 to 20.9 turns per round, -3.6% instructions); its `just bench-runtime` rows were indicative only, because host load put every runtime's p99 in seconds and moved the unchanged tokio rows by up to 8%. This waits on [moq-dev/moq#7530](https://github.com/moq-dev/moq/pull/7530) landing.

Decided 2026-11-01 (maintainer, follow-up planning after the 2026-11-01 /quest-afk run): m2, one quest for both.

- **Quiet re-run.** Record `/proc/loadavg` and run `just bench-runtime` for fanout and fanout-heavy, base against #7530, alternating. [moq-dev/moq#7533](https://github.com/moq-dev/moq/pull/7533) and [moq-dev/moq#7534](https://github.com/moq-dev/moq/pull/7534) saw the load generator's p99 sit near 1.4 s in every run, a startup artifact inside the throughput window, so check whether a quiet host alone fixes p99 or the generator's latency window needs to exclude startup first. Record the result in the [perf epic](/quest/m2/perf/README.md).
- **Nightly series.** #7530's harness (`rs/moq-uring/examples/quiescence/`, in its PR body, uncommitted) drove chat, bulk, and fanout shapes over QUIC and counted instructions, turns, and enters per round. Add a QUIC request-reply variant to the existing `worker_turns` bench (`rs/moq-uring/benches/worker_turns.rs`, already in `sh/gh/nightly.sh`'s bench list), reporting turns and enters per round as that harness did, so the nightly series covers it.
- **Quiet re-run.** Record `/proc/loadavg` and run `just bench-runtime` for fanout and fanout-heavy, base against [moq-dev/moq#7530](https://github.com/moq-dev/moq/pull/7530), alternating. [moq-dev/moq#7533](https://github.com/moq-dev/moq/pull/7533) and [moq-dev/moq#7534](https://github.com/moq-dev/moq/pull/7534) saw the load generator's p99 sit near 1.4 s in every run, a startup artifact inside the throughput window, so check whether a quiet host alone fixes p99 or the generator's latency window needs to exclude startup first. Record the result in the [perf epic](/quest/m2/perf/README.md).
The QUIC request-reply benchmark is now part of `worker_turns` in
[moq-dev/moq#7530](https://github.com/moq-dev/moq/pull/7530). The nightly
`rust-shared` group retains its timing series and turn/enter counter deltas in
the run logs; adding that benchmark is no longer open work here.

Public API: none. Wire: none.

Expand Down
Loading
Loading