What changes as more callers arrive? And how far can two runs of the same configuration disagree? This post answers both questions from one run of pacod-benchmark, set beside another made a day earlier.
The run
The suite is the example "External target". It is written for gateways the benchmark does not
manage, which is why it varies only the load: on such a target the benchmark sets nothing up. This
run used it on the managed pacod-gw test installation: gateway commit 7054b67, one instance,
Valkey as its cache store. Every call is an OpenAI-style streamed request in managed mode. The
OpenAI mock answers its head after 200 ms and sends 20 chunks, 20 ms apart. The suite holds each
load level for a minute:
axes:
load.target: [5, 20, 50]
Three load levels, each with its own baseline straight to the mock, make six cells. The run was made on 11 November, and all 11,917 calls succeeded.
Load
The latencies are the whole call over the steady minute.
| Callers | Cell | Calls/s | p50 | p95 | p99 | Gateway p50 / p99 |
|---|---|---|---|---|---|---|
| 5 | baseline | 6.7 | 725 ms | 881 ms | 1.02 s | – |
| 5 | gateway | 6.8 | 725 ms | 831 ms | 1.01 s | 0.107 / 0.225 ms |
| 20 | baseline | 26.3 | 725 ms | 938 ms | 1.25 s | – |
| 20 | gateway | 26.2 | 733 ms | 938 ms | 1.06 s | 0.086 / 0.181 ms |
| 50 | baseline | 65.8 | 725 ms | 905 ms | 954 ms | – |
| 50 | gateway | 66.0 | 725 ms | 938 ms | 1.07 s | 0.083 / 0.153 ms |
Each caller made about 1.33 calls a second at every level, ten times the load gave ten times the calls, and the median call stayed at 725 ms, with or without the gateway. The gateway's own time did not grow with the load either: its median fell slightly, from 0.107 ms at 5 callers to 0.083 ms at 50, perhaps because a busier process keeps its caches warm.
Where the load stops being cheap shows in the translation run, made the same morning on the same machine with 200 callers. The same request there, streamed to the OpenAI mock, managed about 211 calls a second, or 1.05 per caller. Its median rose to about 920 ms, and its baseline, which never touches the gateway, rose with it. The limit was the load agent, with two CPUs on the gateway's own machine, not the gateway itself.
The same cell, twice
pacod-benchmark gives every cell a comparison key: the SHA-256 of its whole configuration. Two cells with the same key ran exactly the same thing, whichever run or target they belong to. The managed cell at 20 callers in this run has the same key as the 200 ms managed cell of the latency run made the evening before, and so do their baselines. That makes the pair a direct check of how far two runs of one configuration can disagree.
| Cell | Run | Calls/s | p50 | p95 | p99 | Gateway p99 |
|---|---|---|---|---|---|---|
| baseline | 10 Nov, evening | 26.7 | 725 ms | 905 ms | 1.03 s | – |
| baseline | 11 Nov, morning | 26.3 | 725 ms | 938 ms | 1.25 s | – |
| gateway | 10 Nov, evening | 26.7 | 725 ms | 864 ms | 1.17 s | 0.153 ms |
| gateway | 11 Nov, morning | 26.2 | 733 ms | 938 ms | 1.06 s | 0.181 ms |
The medians agree within one histogram step (8 ms). The 99th percentiles do not:
- the baseline's moved by 225 ms between the runs;
- the gateway cell's moved by 115 ms, in the other direction.
Over the same two runs, the gateway's own p99 moved by 0.03 ms.
So one run's tail is mostly the run's: the machine, the agent and whatever else ran beside them
that minute. The gateway's share is a fraction of a millisecond, and the run-to-run spread is
about a thousand times larger. Read a single run's p99 against its own baseline at most, and compare
runs only through their comparison keys. The suite's repetitions field runs every cell several
times in one run, and that is the honest way to put a range on a tail.
Behaviour, not capacity
Like the other two runs, this one says on its page why its figures are behaviour, not capacity:
agent local ran on the gateway's machine; the mock is shared with other load (the tester's load tests)
For capacity, the load agents go on other machines (pacod-gw's deploy/load-agent/, or its Helm
chart's loadAgent), and the target gets a mock of its own. The first benchmark post
explains the rules.
Try it
The same suite runs against any OpenAI-compatible gateway the benchmark does not manage. Register
it as an external target, declare its mock so that its cells line up with other targets' behind the
same mock, and give every cell a max_calls if the target could reach a paid provider:
cargo run -p pacod-bench -- run --suite examples/suites/external.yaml --target target.toml \
--agents local=http://127.0.0.1:18096 --out report.json
Runs are compared two to six at a time on the run pages. The code is in the repository.