zrk: Constant-Throughput Load Generator
zrk is a constant-throughput HTTP load generator, used for the fixed-rate profiles: Latency-1M, Latency-10K, 8Gbit and CON-1M.
Why a third generator
wrk, and gcannon by default, are closed-loop: each connection sends its next request as soon as the previous response lands, so the rate finds its own ceiling. That answers "how fast can this go", which is what almost every profile here asks.
The fixed-rate profiles ask the opposite question. Latency-1M, for example, pins the rate at one million requests per second and measures what the server spent to serve it, so the generator has to hold a rate rather than discover one. gcannon's fixed-rate mode holds one too, and runs the held-connection profiles CON-5M and CON-1M-TLS; the profiles here stay on zrk at a pinned version, so their numbers stay comparable across rounds (see Version pinning).
Why zrk and not wrk2
wrk2 is the original constant-throughput generator and the tool zrk is a rewrite of. Three things decided it:
- Maintenance. wrk2's last commit is from September 2019, with over a hundred open issues. zrk is actively developed.
- Pacing resolution. wrk2 schedules sends on a millisecond timer wheel, which rounds every wait up and adds roughly half a millisecond of the tool's own noise to every sample. zrk computes a closed-form nanosecond offset instead.
- Machine-readable output.
--format jsonemits a single summary object, so the harness parses a document rather than scraping a report. That is what makesrate_ratioavailable at all, andrate_ratiois the validity gate for each of these profiles.
Coordinated omission
Latency is measured from the time a request should have been sent according to the schedule, not from when it actually went out. A server stall therefore lands in the tail instead of being smoothed away by the client simply sending fewer requests while it recovers.
This is why a run that misses the rate reports latencies in the seconds: the client falls behind its schedule and every queued request carries that lag. It is a correct reading of a server that could not keep up, not an artifact.
The validity gate
rate_ratio is achieved rate over offered rate, and it is published on every row. A run meaningfully below 1.0 did not measure the profile, because the load was not the load, so its CPU figure describes a lighter workload than every other entry's. Those runs are flagged rather than ranked as though they were cheap.
Version pinning
The image pins an exact version and verifies its checksum, unlike gcannon which tracks its default branch. The premise of the fixed-rate profiles is that the offered load is identical across entries and across rounds, so a generator drifting underneath it would invalidate comparisons against numbers already published. Bumping the version is a deliberate act that re-baselines the profiles.
zrk has no distro package. benchmark.sh builds the zrk:local image from docker/zrk.Dockerfile automatically when a framework subscribes to one of these profiles and no zrk binary is on the PATH.
connections-1m (CON-1M) is the exception: it runs zrk 3.0.2, while the profiles above stay on 2.3.0. A native zrk 3.0.2 or later on the PATH is used; otherwise benchmark.sh builds a zrk:3.0.2 image from the same Dockerfile, with that version and checksum. 3.0.2 keeps one latency histogram per thread rather than one per connection, about 41 KiB per held connection against 2.3.0's ~303 KiB, which is what lets a million connections fit. zrk takes a single URL, so the million runs as 32 processes, one per loopback address.
Parameters
| Profile | Request | Offered rate | Connections | Duration |
|---|---|---|---|---|
latency-1m | GET /baseline11?a=1&b=2 | 1,000,000 req/s | 1,024 | 20s |
latency-10k | GET /baseline11?a=1&b=2 | 10,000 req/s | 1,024 | 20s |
8gbit | POST /echo with a 10 KB body, over TLS on port 8081 | 50,000 req/s | 512 | 5s |
connections-1m | GET /baseline11?a=1&b=2, over 127.0.0.1-.32 | 250,000 req/s | 1,000,000 (32 processes) | 20s window |
All of them run with 64 threads and 3 runs, keeping the run with the best score.