qqt

Benchmarks

The benchmark record, and how thin it is

One path, one pair of machines, one day — the method, the decomposition of the win, the emulated loss matrix, and what it does not prove.

Every number on this page is measured, not estimated. Two record classes:

  1. The production path — a real deployment, measured live end to end.
  2. The emulated path — the same transports under controlled loss, jitter, and rate shaping in a network-namespace harness (examples/bench-loss-matrix.sh), because a production path cannot be made lossy on demand. |hadron|: QQT-005 the record is reproducible or wrong — the same served backend reached through the platform’s relayed ssh -L and through qqt’s direct UDP, alternating identical requests, gives qqt the plain probe at ~113 ms against ssh’s ~264 ms with a p10→p90 spread under 1 ms where the relay’s runs tens of ms, and the emulated matrix pins ssh -L at 0.0–3.7 Mbit/s under loss where qqt holds its plateau; a rerun on the same shapes that shows parity falsifies this page.

1. The production path

A 4×B200 GPU rental (US East), reached from a European residential uplink over a 41.5 ms direct RTT. The platform’s ssh access is relayed through an intermediary, which turns that into a 90.4 ms round trip; qqt dials the instance’s public IP directly over UDP. The same backend served through both transports, alternating identical requests; request-shape numbers are medians.

Request shapes

Request shape ssh -L tunnel qqt delta
Plain HTTP probe (pure transport, no app) 264 ms 113 ms −151 ms
GET /v1/models 312 ms 115 ms −196 ms
Short chat, time to first byte 481 ms 332 ms −149 ms
Decode-heavy chat (300-token budget) 725 ms 573 ms −151 ms

Against the relay: the alternative baseline

Same backend, same moment, same client, alternating transports:

Regime relayed ssh -L p50 qqt p50 ratio
Warm, persistent channel (n=25 each) 240.0 ms 47.7 ms 5.0×
Cold, new channel per request (n=20 each) 539.5 ms 50.7 ms 10.6×
8 concurrent streams 727.3 ms 45.0 ms 16.2×
32 concurrent streams 635.7 ms 48.6 ms 13.1×

Both endpoints answer a zero-byte 200 in ~0.3 ms, so the delta is transport. The decomposition: 2.65 relayed round trips per request at a 48.9 ms relay premium ≈ 130 ms, plus 1.5 extra round trips at 41.5 ms ≈ 62 ms. The loopback control makes it plain: ssh -L over a 0.1 ms path costs 47.6 ms against qqt’s 47.7 ms — OpenSSH’s own overhead is ~0. It is a tool paying round trips, not a slow tool. On a direct-port cloud the 130 ms term disappears; the ~62 ms round-trip term remains.

Jitter and the agent’s tail

The transport’s p10→p90 is 0.8 ms (112.9→113.7 ms) against the ssh path’s 248→313 ms. The agent-visible metric is different: request→first SSE token p50 488.5 ms, p99 2967.5 ms, p99/p50 6.07× (bootstrap CI 2.12–6.56). That tail is a server-side admission episode — three streams released within 0.0 ms of each other after unequal ~3 s waits — not the tunnel; removing 5 of 115 requests takes the ratio to 2.08×.

No head-of-line blocking

Five independent tests at ≤7 streams (first-byte latency vs concurrency, correlated-blackout null, free-flow during stall, cross-layer uplink occupancy, packet-level burst intersection) found no blocking. During a 3.01 s first-token stall, 214 chunks flowed to other streams on the same connection, with zero retransmits and zero-window events. The one honest effect is shared-vs-alone p50 17.6 vs 13.3 ms — +4.3 ms of batching.

Stream setup is free

Size-matched cold-vs-warm is −0.3 ms (100–250 kB, n=6/33) and −0.8 ms (250–350 kB, n=2/24). A 120 s capture carried zero QUIC handshakes in any request’s budget: 15 SYNs for 117 requests, 6.8–9.3 requests per connection.

Bulk transfer

TCP iperf3, 8 parallel streams, 10 s per run, delivered goodput at the receiver:

Direction ssh -L tunnel qqt speedup
Download (server → client) 177 Mbit/s 504 Mbit/s 2.85× (one run: 593)
Upload (client → server) 226 Mbit/s 395 Mbit/s 1.75×
Retransmit rate (sender) ~0.40% ~0.27% lower loss per byte

Why the gap is structural, not tuning

  • The ssh path is relayed. 2.65 relayed round trips per request against qqt’s 1.15 direct trips; qqt pays the real 41.5 ms RTT and nothing else.
  • Throughput ≈ congestion window ÷ RTT. The relay’s inflated RTT caps every bulk transfer before stream multiplexing even enters the picture.
  • Per-stream recovery. ssh multiplexes every forwarded connection over one byte stream with one window: each retransmit stalls every connection (cross-channel head-of-line blocking). QUIC recovers loss on the one stream that lost the packet.

Caveats, stated plainly

  • These are healthy-path numbers with small payloads. The relay is the whole story on this path; a direct-ssh path will not show this gap.
  • The upload direction is gentler because the residential uplink is the shared bottleneck — the transport difference has less room to matter.
  • One production path, one pair of machines. Different paths vary; measure yours (next section).

Reproducing the production measurements

  • Request-shape latency: time identical requests through both transports alternately, e.g. curl -sS -o /dev/null -w '%{time_total}\n' http://127.0.0.1:<forward-port>/health, 20+ runs per transport, compare medians and tails.
  • Bulk: iperf3 -c <target> -p <port> -t 10 -P 8 through each transport’s local forward, -R for the download direction; compare the receiver-side summary.
  • Keep the backend identical across transports and run them interleaved, not sequentially, so backend drift cannot masquerade as a transport win.

The captured matrix: two regions, three lanes

Thirty captures on 11 Nov 2026, one iperf3 load each: eu-west-2 (London) or us-west-1 (Oregon), reached by qqt, by plain ssh -L to the box’s own address, or by ssh -L through the provider’s relay, at n = 1, 2, 4, 8, 16 streams. Figures are the median of the 100 ms bins, wire rate, both directions summed; every cell carried its nominal stream count. This table is the home for every number the site’s matrix page prints.

median Mbit/s n=1 n=2 n=4 n=8 n=16
eu-west-2 · qqt 1072.2 1747.2 1832.0 1792.1 1823.0
eu-west-2 · ssh -L direct 476.8 942.4 1892.5 3017.6 2974.5
eu-west-2 · ssh -L proxied 98.4 189.2 228.0 254.4 290.3
us-west-1 · qqt 174.5 281.5 503.9 967.5 1780.1
us-west-1 · ssh -L direct 60.5 151.4 180.8 409.0 81.6
us-west-1 · ssh -L proxied 106.0 219.5 240.2 262.6 303.8

The loss case the site states: in London at eight streams the direct door reaches 3.02 Gbit/s and qqt 1.79. qqt’s case there is the relay it deletes and the round trips it saves, not raw concurrency past two streams — the proxied lane it replaces moves 0.25 Gbit/s in the same cell.

2. The emulated path — loss, jitter, and buffer sensitivity

Measured in the harness: two network namespaces joined by a veth pair, with tc netem shaping both directions to a 90 ms RTT with configurable loss and jitter, and htb for rate shaping. Four transports over the identical path: raw TCP (no tunnel), qqt, a kernel datagram tunnel, and ssh -L. The datagram column is the kernel-crypto baseline the userspace cost is measured against — it is a measuring stick here, not a recommendation, and the kit ships no tunnel of that kind. The method and the raw tables live in this section; the harness itself is examples/bench-loss-matrix.sh.

What the harness can and cannot reproduce:

  • Cannot: the ssh relay tax (a local ssh -L is a direct connection — the production penalty above does not appear here).
  • Can: the loss/jitter regimes where the transports differ structurally (one congestion-control domain per inner TCP over a raw datagram tunnel and over ssh’s byte stream vs qqt’s per-stream recovery), the BDP/buffer ceiling, and CPU per byte.

Environment: kernel 7.0.0-38 (dev VM, 6 vCPU, net.core.rmem_default/wmem_default 212992, *_max 4 MiB), quinn 0.11 stack with GSO on, one 10 s iperf3 run per cell, delivered goodput at the receiver (down = server→client, up = client→server). qqt and ssh ran as persistent connections across profiles — their deployment reality; each raw and datagram-tunnel TCP test began with its own fresh connection.

Throughput under loss

The tables below are the historical record from the four-transport run; the harness now measures three (raw, qqt, ssh), so the datagram column is reproducible only from an older checkout. It is kept because it is the kernel-crypto baseline these numbers were measured against — not because the kit carries such a tunnel.

8 parallel streams (delivered Mbit/s, down / up):

Loss profile raw TCP qqt kernel tun ssh -L
0% loss 2682 / 2717 378 / 469 872 / 1050 251 / 255
0.5% loss 189 / 134 10.0 / 15.9 26.6 / 37.2 3.7 / 0.0
1% loss 31.4 / 33.3 2.5 / 8.6 13.5 / 13.7 0.0 / 0.0
2% loss 18.0 / 23.7 1.7 / 0.0 8.6 / 11.0 0.0 / 0.3
5% loss 5.4 / 7.3 0.9 / 0.0 4.9 / 4.4 0.0 / 0.1
1% loss + ±10 ms jitter 27.5 / 30.4 0.8 / 0.8 13.9 / 14.4 1.8 / 0.0

Single stream (delivered Mbit/s, down / up):

Loss profile raw TCP qqt kernel tun ssh -L
0% loss 337 / 336 100 / 102 225 / 206 169 / 150
0.5% loss 66.9 / 10.8 28.9 / 21.7 2.4 / 3.8 4.1 / 24.3
1% loss 2.9 / 2.4 6.8 / 3.8 2.2 / 1.8 2.3 / 1.9
2% loss 0.9 / 2.7 2.5 / 6.4 1.0 / 1.3 0.0 / 0.0
5% loss 0.7 / 1.3 3.4 / 1.3 0.6 / 0.5 0.0 / 0.3
1% loss + ±10 ms jitter 2.8 / 2.4 0.9 / 1.0 1.1 / 1.4 1.8 / 1.8

What the matrix says

  • The clean-path tax is real and measured: a kernel datagram tunnel moves 872–1050 Mbit/s where userspace qqt moves 378–469 — roughly 2.3–2.8× for kernel crypto and copies, exactly the prior worth measuring instead of dodging. qqt itself plateaued at ~470 Mbit/s on this 90 ms path — the same ~500 Mbit/s territory the production record shows, and not a socket-buffer artifact (see below).
  • Per-stream recovery wins single-stream loss: at 1–5% loss a single stream through qqt delivers 1.3–6.8 Mbit/s while the same stream over a raw datagram pipe delivers 0.5–2.2 — QUIC’s own retransmission shields the inner connection from most of the loss.
  • The aggregate turns on the controller: with 8 streams under loss, eight independent inner congestion controllers (13.5 Mbit/s at 1%) face qqt’s one shared QUIC congestion domain — and what that domain yields depends on --cc. Cubic collapses to 2.5–8.6 Mbit/s; bbr, the shipped default, holds 336–367 on the same shape. The one-connection-one-congestion-domain limitation is real and quantified here; its cost is a function of the controller, never a fixed number.
  • ssh -L collapses under loss: 0.0–3.7 Mbit/s at every loss profile with 8 streams — every multiplexed connection head-of-line-blocks on the one byte stream’s retransmits, the production record’s mechanism reproduced in its most extreme form. Even on the clean path the single ssh TCP connection caps the aggregate at ~251 Mbit/s where the others scale.
  • Request latency: a request through the persistent tunnel costs ~1 RTT (median 92 ms) where a fresh TCP through raw, a raw tunnel, or ssh costs ~2 RTT (181 ms) — connection reuse, not transport magic. The relay multiplier of the production path cannot be reproduced locally; that part of the story stays in §1.
  • CPU per byte (qqt, client + server combined): ~6.3 CPU-ms per MB — about 0.8 of a core per Gbit/s. That is the userspace price of ring + QUIC framing; the kernel paths’ CPU is not per-process attributable, but the clean-path throughput gap shows their overhead exists too.
  • Jitter is the unresolved regime: in the jitter profile qqt’s inner streams sent 23 Mbit/s but delivered under 1 — heavy netem reordering starved delivery badly in this harness. Single 10 s runs, netem distribution artifacts possible: characterized as measured once, mechanism uncharacterized — finer instrumentation and repetition are the follow-up, not a conclusion.

UDP buffer sensitivity — checked, and not the ceiling

The production ceiling (~504 Mbit/s at ~90 ms RTT) was suspected to be the kernel’s default UDP socket buffer (~208 KiB against a ~5.6 MB bandwidth-delay product). Measured on this kernel, it is not: with the path rate-capped at 500 Mbit/s, qqt delivered 471–475 Mbit/s with stock buffers, with only *_max raised, and with *_max + *_default at 4 MiB — no measurable difference between the three. quinn never calls SO_RCVBUF/SO_SNDBUF, and on this kernel with GSO/GRO the defaults held the cap; the qqt plateau at ~470–500 Mbit/s is the transport’s own behavior at 90 ms RTT, not the socket buffer. The full buffer story — when it does matter, the two-sysctl distinction, the check procedure, and the macOS surface — is docs/instructions_qqt-tuning.md.

Method caveats, stated

Single host, veth + netem: the loss is uniform and independent (no correlated bursts), the jitter distribution is synthetic, and every cell is one 10 s run — lossy cells in particular have real run-to-run variance. macOS was not part of the emulated matrix (no UDP GSO there; quinn falls back — no throughput delta is claimed). Raw JSON per cell and the harness itself: examples/bench-loss-matrix.sh.

3. The controller/window matrix

The CC and flow-control design this matrix priced is docs/rationale_qqt-congestion-control.md; this section is the measured record. Environment: the same netem harness shape as §2 (90 ms RTT, 500 Mbit/s cap), between two hosts on one L2, qqt persistent per cell and restarted between cells; per cell iperf3 dl8/dl1/ul8 (10 s for most cells; the lossy dl8 cells ran 20 s, since a loss ramp needs the longer window — see the bbr 1%-loss row below; delivered goodput at the receiver), 20 idle + 20 under-bulk latency probes, and both ends’ quinn stats scraped. The controllers: quinn’s cubic (default) and quinn’s experimental bbr; the windows are per-stream stream_receive_window (the connection-level window rode at 64 MiB on every raised cell).

cell (cc × window × loss) dl8 dl1 ul8 idle p50/p90 bulk p50/p90
cubic × 1.25 MB × clean 454.4 99.1 437.0 91.1 / 91.3 150.6 / 153.4
cubic × 4 MB × clean 453.2 324.0 436.6 91.0 / 91.2 179.4 / 187.8
cubic × 8 MB × clean 57.7 270.8 436.3 91.6 / 99.5 148.7 / 286.1
cubic × 1.25 MB × 1% 7.4 4.6 4.8 91.1 / 91.4 108.7 / 132.8
cubic × 8 MB × 1% 2.9 3.1 8.5 91.1 / 91.3 536.1 / 836.1
bbr × 1.25 MB × clean 457.2 99.0 445.2 91.2 / 91.4 153.5 / 154.4
bbr × 4 MB × clean 453.5 326.2 441.5 90.9 / 91.1 181.7 / 198.3
bbr × 8 MB × clean 455.1 474.4 441.2 91.0 / 91.3 176.3 / 187.2
bbr × 1.25 MB × 1% 366.6 68.5 356.7 91.3 / 91.5 119.1 / 155.0
bbr × 8 MB × 1% 336.1 294.2 323.0 91.0 / 91.3 187.0 / 237.2

What the matrix settles:

  • The clean 1-stream cell is pure flow control — 1.25 MB / 90 ms ≈ 111 Mbit/s predicts the measured 99, and the 4 MB raise delivers the window/RTT lift (324 of the ~356 ceiling; cubic’s ramp binds the rest).
  • The clean 8-stream aggregate is congestion/CPU-bound, not window-bound (8 × 1.25 MB > the 5.6 MB BDP; measured unchanged at every window until the 8 MB cell breaks it).
  • The 8 MB collapse is the receiver’s socket, measured: 57.7 with 879 lost packets on the download sender and RcvbufErrors deltas on the receiving end (+29 at cubic-4MB cells, +0 at bbr-4MB) — the window is a burst license, and cubic’s bursts overrun the kernel’s UDP receive buffer that the §2 buffer sweep showed holding at the smaller windows.
  • The 1% collapse is cubic’s multiplicative decrease in one shared domain; bbr’s cells are the controller doing what it was designed for (loss-agnostic rate model) — 336–367 Mbit/s where cubic holds 2.5–8.6.
  • bbr’s cwnd is unbounded in this implementation: the upload sender’s cwnd read 687 MB across the three clean cells (≈ total bytes acked) — the measured form of the pacer-rate gap the design doc names as the cost the shipped default carries.
  • Idle latency is untouchable by any of it: 91 ms p50/p90 at every cell — the tunnel’s latency asset is structural (no relay, ~1 RTT), and everything this matrix changes is for bulk and for loss.

The shipped defaults (--cc bbr, --recv-window 4 MiB) are this matrix’s adjudication. The verification record — the same harness, the same VM pair, the same netem shape, the landed 0.6.0 flags instead of the experiment knobs; fresh tunnel per cell; 20 idle + 20 under-bulk latency probes; both ends’ stats scraped (the raw verification cells are qqt-lfp):

cell (metric) exp-branch 0.6.0 flags verdict
cubic × 1.25 MB, clean (1-stream dl) 99.1 104.1 reproduced (band 99–111)
cubic × 4 MB, clean (1-stream dl) 324.0 326.1 reproduced
bbr × 4 MB, clean (1-stream dl) 326.2 325.9 reproduced
bbr × 8 MB, clean (1-stream dl) 474.4 474.2 reproduced
cubic × 4 MB, 1% loss (8-stream dl) 2.5–8.6 6.7 reproduced
bbr × 4 MB, 1% loss (8-stream dl) 336–367 322.8 at 10 s; 336.6 at the exp run’s own 20 s reproduced at matched run length

(The 10 s loss cell undershoots because a lossy ramp needs the longer run — the exp matrix’s own dl8 cells ran 20 s — not because the flags differ.)

Two findings beyond the bands:

  • The shipped pair bounds bbr’s cwnd growth. The exp branch (stream window raised, connection window left at quinn’s unbounded default) read 683–687 MB of client-side cwnd on clean cells; the 0.6.0 build — which ships the 64 MiB connection window beside the stream window — reads 31–46 MB (client) and ~29–30 MB (server) on the same cells. The connection-level receive window caps the aggregate credit, and the runaway measured without it does not reproduce under it. The rate pacer remains the principled fix (the fairness caveat stands regardless); the pair contains the blast radius by construction.
  • The kernel-buffer ceiling is rate-dependent, not settled. The unshaped phase-0 cells ran the clean pair at 5.2–7.6 Gbit/s — and the receivers’ RcvbufErrors moved again (5,312 on cubic’s download receiver; 304,428 on bbr’s), on the same stock 208 KiB defaults under which the §2 sweep found no ceiling at a 500 Mbit/s cap. Size for the rate you actually run, not for the record’s.

The idle anchors held on every shaped cell (91.1–91.3 ms p50), and the pair was left unshaped after the run.

4. Concurrency, measured on a 40 ms path

The production traffic never exceeded 7 streams and upload concurrency never exceeded 1, so this section supplies the missing regime on an emulated path: two lab hosts on a mesh link, 20 ms of netem delay each way (40 ms RTT), the qqt server on one and the client on the other, a Python HTTP target behind the tunnel. The harness is examples/bench-concurrency.py: serve runs the target, run --mode m1|m2|m3|m4 the client.

Concurrent 1.2 MB uploads (M1)

concurrent uploads median last byte slowest stream aggregate
1 113.5 ms 113.5 ms 86.4 Mbit/s
4 144.4 ms 144.6 ms 271.0 Mbit/s
16 160.2 ms 1105.1 ms 142.1 Mbit/s
32 321.7 ms 1089.6 ms 288.1 Mbit/s

All 32 requests completed. The ~1 s slowest-stream outliers reproduce against the direct path in the same harness, where the Python target’s accept backlog (5) also resets connections at 32 — the outlier is the application, not the tunnel. qqt absorbed 32 concurrent connections through one QUIC connection where the direct path reset them.

Small streams under a bulk upload (M2)

32 SSE streams (1 kB chunks) while one 9.6 MB upload ran: p99 inter-chunk gap 11.0 ms inside the upload window vs 12.5 ms outside (no measurable tax), max 11.1 ms, across 401 gaps inside and 1212 outside. An earlier run read 13.8 vs 10.6 ms (+3.2 ms) on the same shapes. No stall, no stream dropped.

The cold request (M3)

state 1.2 MB upload, done
fresh connection, after 1.2 s idle 84.4 ms
warm connection, after 1.2 s idle 43.3 ms
warm connection, after 12 s idle 117.8 ms

--stats 1 reads cwnd at 238.6 KiB on a new connection, growing to 1.7–2.9 MiB on the live one. The 1.2 s cold cost is about one RTT, not five window refills; after a 12 s gap the counterpart drops to 117.8 ms because BBR’s ProbeRtt caps the window at 0.75×BDP (745.9 KiB in the stats line) for one round trip. A 5 s keepalive did not prevent the cap (100.7 ms). See the congestion record’s “start window and the idle gap”.

Loss under concurrency (M4)

16 concurrent 1.2 MB uploads, 1% loss on the path:

controller aggregate median last byte
bbr (default) 147.8 and 142.6 Mbit/s 414.7 and 370.1 ms
cubic 8.7 and 9.6 Mbit/s 18.1 and 16.3 s

The 15–17× collapse is the same cliff the 90 ms matrix records at 8-stream download; the default stays bbr.

Method caveats: the target is Python’s ThreadingHTTPServer (backlog 5), so its own concurrency floor is part of every number, and the direct control is reported above where it matters. The path is a WireGuard mesh link with netem, not a WAN: the delay is real, the bandwidth is higher than a rental’s.

5. Interactive terminals — keystroke to glyph

The other sections measure requests and streams. A terminal is a different workload: the unit is one keystroke, the payload is a handful of bytes, and the thing the user judges is the echo. Same backend, same client, same key, alternating transports (examples/bench-interactive-latency.sh), 120 samples per cell per transport, zero rejections, on a 40.7 ms RTT path.

workload qqt p50 qqt p90 qqt p99 relayed ssh p50 relayed ssh p90 relayed ssh p99
single keystroke echo 49.7 ms 59.1 61.4 233.1 ms 234.4 261.2
vi Ctrl-F page repaint (2,106 bytes) 49.1 ms 56.1 61.2 268.9 ms 270.5 280.0
burst of 12 keys, 6 ms apart — first glyph 72.9 ms 73.0 73.7 237.0 ms 240.1 317.9
same burst — last glyph 122.3 ms 127.6 129.5 325.3 ms 327.8 357.4

The ratio on keystroke echo is 4.7×, the same shape §1 records for requests: a tool paying round trips. The burst rows are the reason a quarter-second echo is worse than it looks — the first glyph arrives after one round trip, but the tail of a fast burst trails by more than twice that, so typeahead visibly lags behind the fingers on the relayed path and does not on the tunnel.

Measured independently off a 60 fps capture of the same two paths, reading the keypress overlay’s pulse against each pane’s glyph rise: qqt 50 ms p50, relayed ssh 217 ms p50 (frame quantization 16.7 ms). The screen and the harness agree.

Method caveats: the client host sat 40.7 ms from the far end, so every number here is that path’s — the ratio is the transferable finding, not the absolute values. The far end was a rented GPU container; the vi cell rejects any sample whose repaint is smaller than a screen, so a cursor-only move can never be counted as a redraw.

6. Scale — the two ends of the range

The throughput range qqt has been driven across, as measured:

figure where it was taken
83.4 Gbit/s the ceiling tested
1.25 Gbit/s an AWS t2.nano client — two burstable vCPUs

|hadron|: both are the owner’s own measurements and the site prints them as headline chips; a rerun that cannot reproduce either figure on its stated host falsifies this section, and the chips move with it.

← All documentation