Answers for LLM inference engineers

Is your LLM benchmark client the bottleneck? Measured client overhead of vllm bench serve, guidellm, aiperf, AsyncOpenAI, httpx and aiohttp

Yes, earlier than most people assume. On one client CPU core, against a mock server that always answers with a 50 ms time to first token (TTFT) and 20 ms between tokens, vllm bench serve 0.34.0 added 9.0 ms to the median TTFT at concurrency 64 and 220 ms at 1024, and kept only 80% of the 1024 requests it was asked to hold in flight. An AsyncOpenAI loop (openai 3.62.2) added 27 ms at 64 and 280 ms at 256; bare httpx with httpcore 1.x never held more than about 68 requests in flight. Bare aiohttp stayed within 0.8 ms up to 256. The tell-tale pattern: TTFT rises with concurrency while inter-token latency stays at the true value, and the server sees fewer requests in flight than you asked for. To check your own setup, run any tool against clientcheck.py, a mock server that reports the TTFT and concurrency it really delivered.

Published 2026-12-03 · measured 2026-12-02 to 2026-12-03 on a 2-vCPU Linux VM (mock server on core 0, client on core 1), Python 3.13, 3 runs per cell, medians shown

Look up a client, or check your own numbers

Run clientcheck.py serve, point your tool at it with the concurrency below, then copy two numbers from clientcheck.py report.

Formulas: added TTFT = your tool's TTFT − the server's TTFT. Achieved = server's mean in flight ÷ the concurrency you set. We call a client “keeping up” when added median TTFT ≤ 5 ms and achieved ≥ 95%. A closed-loop client can never hold exactly 100%: there is a short gap between one request ending and the next starting.

How much time to first token does each client add?

From a few milliseconds at concurrency 16 to seconds at 1024, depending on the client. Each cell is the client's median TTFT minus the median TTFT the server actually delivered (about 50.4 ms), all on one client core.

Client (one core)116641282565121024
bare aiohttp 3.14.5 (unlimited connector)+0.7 ms+0.7 ms+0.8 ms+0.6 ms+0.7 ms+7.0 ms†+62 ms†
vllm bench serve 0.34.0+1.4 ms+3.6 ms+9.0 ms+13.1 ms+36 ms+80 ms+220 ms†
guidellm 0.8.1 (concurrent profile)+0.9 ms+1.0 ms+2.7 ms+7.5 ms+39 ms†+117 ms†+166 ms†
aiperf 0.14.0 (default workers)+0.9 ms+1.2 ms+23 ms+33 ms+49 ms+83 ms†+71 ms
AsyncOpenAI, openai 3.62.2 + DefaultAioHttpClient+1.7 ms+1.1 ms+1.9 ms+50 ms+171 ms+1.2 s+4.0 s
AsyncOpenAI, openai 3.62.2 (httpx2 2.17.0)+1.9 ms+3.9 ms+27 ms+77 ms+280 ms+711 ms+2.4 s†
AsyncOpenAI, openai 2.46.0 (httpx 0.29.0, httpcore 1.0.9)+2.6 ms+14.9 ms+53 ms+114 ms+268 ms+765 ms+1.7 s†
bare httpx 0.29.0 + httpcore 1.0.9 (unlimited pool)+1.2 ms+7.5 ms+15.3 ms+302 ms+2.9 s+6.6 s+10.1 s

Green: ≤5 ms added; amber: ≤50 ms; red: more. † The mock server itself fell behind in at least one of the three runs (its token timer p99 was over 4 ms), so part of that cell may be the server. guidellm had to share the server's core (see method), which is why its cells from 256 up carry †.

Does the benchmark really reach the concurrency I set?

Not above a few hundred streams on one core: the server saw fewer requests in flight than requested. Each cell is the time-weighted mean number of requests the server had open. When this drops, the request rate and token throughput the tool reports describe the client, not the server.

Client (one core)116641282565121024
bare aiohttp 3.14.5 (unlimited connector)11664127254500†955†
vllm bench serve 0.34.011663125243464824†
guidellm 0.8.1 (concurrent profile)11660110179†232†267†
aiperf 0.14.0 (default workers)11659107175216†211
AsyncOpenAI, openai 3.62.2 + DefaultAioHttpClient11663120223320320
AsyncOpenAI, openai 3.62.2 (httpx2 2.17.0)11662119192231180†
AsyncOpenAI, openai 2.46.0 (httpx 0.29.0, httpcore 1.0.9)11661115199242171†
bare httpx 0.29.0 + httpcore 1.0.9 (unlimited pool)1166068616259

aiperf is the clearest case: at concurrency 1024 the server saw about 211 requests in flight, yet aiperf reported a median TTFT of 121 ms, which looks healthy. On this 2-vCPU machine aiperf starts one worker process, because its default is max(1, min(int(cpu_count × 0.75) − 1, 32)) (aiperf/workers/worker_manager.py, CPU_UTILIZATION_FACTOR 0.75); on a 32-core machine the same formula gives 23 workers. guidellm starts up to 10 worker processes (max_worker_processes). vllm bench serve is one asyncio process whatever the machine.

Why does TTFT go up while TPOT and ITL look normal?

Because a busy client is late to read the first chunk, and by then the following chunks are already waiting in the socket. Every tool here still reported a TPOT close to the true 20 ms at concurrency 1024 (vllm bench serve 20.4 ms, guidellm 19.8 ms, aiperf 22.4 ms) while its TTFT was inflated. When the client falls far enough behind, the buffered chunks are read in one go and TPOT collapses: AsyncOpenAI with DefaultAioHttpClient reported a TPOT of 0.05 ms at 1024. If your benchmark shows TTFT climbing with concurrency and a flat or improving TPOT, test the client before blaming prefill.

Why does AsyncOpenAI or httpx hang with thousands of concurrent requests?

httpcore 1.x, which httpx and openai before 3.0.0 use, rescans the whole connection pool for each queued request; openai 3.0.0 (2026-08-12) moved to httpx2, whose pool loop was rewritten. In httpcore 1.0.9 (still the latest 1.x, and what httpx 0.29.0 requires) _assign_requests_to_connections builds the list of available and idle connections inside the loop over queued requests. httpcore2 2.3.0 (2026-06-01) builds it once per call, with a comment saying this “brings the loop from O(N*M) to O(N+M) in the common case”; we checked the source of every httpcore2 release on PyPI, and 2.0.0–2.2.0 still had the old loop. openai 3.x requires httpx2>=2.7.0.

The queue only builds up when you submit more requests than the pool's max_connections (1000 in the openai SDK). So we fired N streaming requests at once with no limit in the script; the mock held each one for 1 s and sent 2 tokens:

Client1000 at once: all sent after1000: done after2000 at once: all sent after2000: done after4000 at once: all sent after4000: done after
bare aiohttp 3.14.5 (unlimited connector)0.02 s1.4 s0.07 s1.7 s0.12 s2.2 s
AsyncOpenAI, openai 3.62.2 + DefaultAioHttpClient0.11 s2.8 s1.42 s4.7 s3.59 s8.3 s
AsyncOpenAI, openai 3.62.2 (httpx2 2.17.0)0.16 s3.9 s2.26 s6.6 s6.14 s13.3 s
AsyncOpenAI, openai 2.46.0 (httpx 0.29.0, httpcore 1.0.9)0.11 s3.8 s51.28 s154.8 sno request reached the server within 900 s (3 of 3 runs)
bare httpx 0.29.0 + httpcore 1.0.9 (unlimited pool)0.07 s15.7 s0.14 s41.4 s0.24 s116.1 s

In one of the three openai 3.62.2 runs at 4,000, 621 requests never reached the server and ended as client-side errors (that run did not save the error text). “All sent after” is when the last request reached the server, counted from the first; “done after” is the client's wall time. Medians of 3 runs on one client core. With openai 2.46.0 the server never saw more than 1,000 requests at once (the SDK's max_connections), so the rest waited in httpcore's pool, which is where the per-request rescans happen. At 4,000, openai 2.46.0 did not get a single request to the server within 900 s in any run, while openai 3.62.2 finished in 13 s. Bare httpx with an unlimited pool gets every request to the server within a fraction of a second but then takes far longer than aiohttp to finish them; we did not profile where that time goes. NVIDIA's NeMo Gym team describes the same httpcore loop and a 40-minute stall at about 16,000 queued requests in their engineering note.

What to do: upgrade to openai 3.x; or pass http_client=DefaultAioHttpClient() (install openai[aiohttp]), which was the fastest AsyncOpenAI variant here up to concurrency 256; or keep your own asyncio.Semaphore below the pool's max_connections; or, for load generation, use several processes. On one core, no AsyncOpenAI variant held 256 streams without adding more than 100 ms.

Why do guidellm and vllm bench serve give different throughput?

Usually because they did not run at the same concurrency; at equal concurrency both reported what the server measured, until the client saturated. vllm bench serve sends every prompt at time 0 when --request-rate is inf (the default) and no --max-concurrency is set. In guidellm 0.8.1 the throughput profile has no default concurrency limit (it falls back to max_concurrency = 10,240 in settings.py), and the sweep profile defaults to 512. In guidellm issue #470 (guidellm 0.3.1, about 6% lower throughput than vllm bench serve at 1,000 requests) the maintainer pointed to exactly this difference. With both set to the same closed-loop concurrency here, each tool's own request rate was within 3% of the server's count, but both delivered less concurrency than asked from a few hundred streams up (table above), so a gap between them at high load can be two different client limits.

How do I check my own benchmark client?

Run clientcheck.py as the server, point your tool at it, and compare. It is one Python file with no dependencies for the server: an OpenAI-compatible /v1/completions and /v1/chat/completions endpoint (streaming and not, stream_options.include_usage, /v1/models) that sends each token on a timer and records, per request, the TTFT it delivered and how many requests were open.

# terminal 1: the mock server on its own core
taskset -c 0 python3 clientcheck.py serve --port 8765 --ttft-ms 50 --itl-ms 20 --tokens 64

# terminal 2: your tool, on other cores, e.g.
vllm bench serve --backend openai --base-url http://127.0.0.1:8765 --endpoint /v1/completions \
  --model mock --tokenizer <any local tokenizer> --dataset-name random \
  --random-input-len 32 --random-output-len 64 --ignore-eos --num-prompts 1024 --max-concurrency 256

# then: what the server really delivered (and reset)
python3 clientcheck.py report --port 8765

The report prints the server-side TTFT percentiles, the mean and maximum number of requests in flight, requests and tokens per second, and the server's own timer lateness. If that lateness p99 is above about 2–4 ms, give the server more CPU or lower the load; the mock is pure Python and on our core it kept up to roughly 256 concurrent streams at 50 tokens/s each. clientcheck.py probe --client aiohttp|httpx|openai|openai-aiohttp --concurrency 1,64,256 runs the built-in clients from the tables. Benchmark tools need a tokenizer to build prompts; make_tokenizer.py in the source folder writes a small one offline.

Download clientcheck.py · all medians as JSON

All measurements

ClientConcurrencyTool's TTFT p50Server's TTFT p50Added p50Added p99Tool's TPOT or ITL p50 (true 20 ms)Really in flight (mean)Requests/sServer timer p99
aiohttp151 ms50 ms+0.7 ms+1.3 ms20.0 ms11≤2 ms
aiohttp1651 ms50 ms+0.7 ms+3.2 ms20.0 ms1612≤4 ms
aiohttp6451 ms50 ms+0.8 ms+7.3 ms20.0 ms6449≤4 ms
aiohttp12851 ms50 ms+0.6 ms+17.0 ms20.0 ms12797≤2 ms
aiohttp25651 ms50 ms+0.7 ms+48 ms20.0 ms254194≤4 ms
aiohttp51257 ms50 ms+7.0 ms+63 ms20.1 ms500381≤8 ms †
aiohttp1024113 ms50 ms+62 ms+145 ms20.0 ms955729≤32 ms †
vllm bench serve152 ms50 ms+1.4 ms+2.6 ms20.0 ms11≤4 ms
vllm bench serve1654 ms51 ms+3.6 ms+5.1 ms20.0 ms1612≤2 ms
vllm bench serve6460 ms50 ms+9.0 ms+35 ms20.0 ms6348≤2 ms
vllm bench serve12864 ms50 ms+13.1 ms+72 ms20.0 ms12595≤2 ms
vllm bench serve25687 ms50 ms+36 ms+116 ms20.1 ms243185≤2 ms
vllm bench serve512130 ms50 ms+80 ms+231 ms20.1 ms464354≤2 ms
vllm bench serve1024270 ms50 ms+220 ms+425 ms20.4 ms824629≤8 ms †
guidellm151 ms50 ms+0.9 ms+3.0 ms20.0 ms11≤2 ms
guidellm1652 ms51 ms+1.0 ms+11.7 ms20.0 ms1612≤4 ms
guidellm6453 ms50 ms+2.7 ms+44 ms20.0 ms6046≤4 ms
guidellm12858 ms50 ms+7.5 ms+69 ms20.0 ms11084≤4 ms
guidellm25690 ms50 ms+39 ms+187 ms19.9 ms179136≤128 ms †
guidellm512167 ms50 ms+117 ms+302 ms19.7 ms232177≤214.029 ms †
guidellm1024217 ms50 ms+166 ms+908 ms19.8 ms267198≤986.721 ms †
aiperf151 ms50 ms+0.9 ms+4.0 ms20.0 ms11≤4 ms
aiperf1652 ms51 ms+1.2 ms+14.1 ms20.1 ms1612≤4 ms
aiperf6473 ms50 ms+23 ms+69 ms20.0 ms5945≤2 ms
aiperf12884 ms50 ms+33 ms+170 ms20.1 ms10782≤2 ms
aiperf25699 ms50 ms+49 ms+334 ms21.0 ms175134≤4 ms
aiperf512133 ms50 ms+83 ms+664 ms20.8 ms216165≤16 ms †
aiperf1024121 ms50 ms+71 ms+742 ms22.4 ms211161≤4 ms
AsyncOpenAI + aiohttp152 ms50 ms+1.7 ms+9.9 ms20.0 ms11≤2 ms
AsyncOpenAI + aiohttp1652 ms51 ms+1.1 ms+23 ms20.0 ms1612≤2 ms
AsyncOpenAI + aiohttp6452 ms50 ms+1.9 ms+72 ms20.0 ms6348≤4 ms
AsyncOpenAI + aiohttp128101 ms50 ms+50 ms+134 ms19.9 ms12091≤2 ms
AsyncOpenAI + aiohttp256222 ms50 ms+171 ms+301 ms19.7 ms223170≤2 ms
AsyncOpenAI + aiohttp5121.3 s50 ms+1.2 s+1.9 s14.6 ms320244≤4 ms
AsyncOpenAI + aiohttp10244.1 s50 ms+4.0 s+6.9 s0.1 ms320244≤4 ms
AsyncOpenAI 3.x152 ms50 ms+1.9 ms+16.6 ms20.0 ms11≤2 ms
AsyncOpenAI 3.x1654 ms50 ms+3.9 ms+35 ms20.0 ms1612≤4 ms
AsyncOpenAI 3.x6478 ms50 ms+27 ms+83 ms20.2 ms6247≤4 ms
AsyncOpenAI 3.x128127 ms50 ms+77 ms+126 ms20.3 ms11991≤4 ms
AsyncOpenAI 3.x256331 ms50 ms+280 ms+702 ms23.6 ms192147≤2 ms
AsyncOpenAI 3.x512762 ms50 ms+711 ms+1.8 s37.3 ms231176≤2 ms
AsyncOpenAI 3.x10242.5 s50 ms+2.4 s+8.2 s67.5 ms180137≤128 ms †
AsyncOpenAI 2.x153 ms50 ms+2.6 ms+171 ms20.0 ms11≤2 ms
AsyncOpenAI 2.x1665 ms50 ms+14.9 ms+131 ms20.0 ms1612≤2 ms
AsyncOpenAI 2.x64104 ms50 ms+53 ms+118 ms20.1 ms6147≤2 ms
AsyncOpenAI 2.x128165 ms50 ms+114 ms+208 ms20.1 ms11588≤2 ms
AsyncOpenAI 2.x256318 ms50 ms+268 ms+331 ms21.5 ms199152≤2 ms
AsyncOpenAI 2.x512816 ms50 ms+765 ms+975 ms31.0 ms242185≤2 ms
AsyncOpenAI 2.x10241.8 s50 ms+1.7 s+8.9 s67.4 ms171131≤8 ms †
bare httpx152 ms50 ms+1.2 ms+25 ms20.0 ms11≤2 ms
bare httpx1658 ms51 ms+7.5 ms+28 ms20.0 ms1612≤4 ms
bare httpx6466 ms50 ms+15.3 ms+286 ms20.0 ms6046≤2 ms
bare httpx128353 ms50 ms+302 ms+5.2 s20.0 ms6852≤2 ms
bare httpx2563.0 s50 ms+2.9 s+6.5 s21.1 ms6146≤2 ms
bare httpx5126.6 s50 ms+6.6 s+27.7 s21.0 ms6247≤2 ms
bare httpx102410.2 s50 ms+10.1 s+64.9 s22.2 ms5945≤4 ms

How this was measured

FAQ

How do I know if my LLM benchmark client is the bottleneck?
Point the benchmark at a mock server with a fixed, known latency, such as clientcheck.py on this page. If the tool reports a higher TTFT than the server delivered, or the server sees fewer requests in flight than the concurrency you set, the client added the difference. With a real model, a client bottleneck shows as TTFT that grows with concurrency while inter-token latency stays flat.
At what concurrency does vllm bench serve stop being accurate?
In our runs on one CPU core, vllm bench serve 0.34.0 added 3.6 ms to the median TTFT at concurrency 16, 9.0 ms at 64, 36 ms at 256 and 220 ms at 1024, where only 80% of the requested 1024 requests were really in flight. It is a single asyncio process, so a faster core moves these points but more cores do not.
Why does AsyncOpenAI get slow with many concurrent requests?
Two separate things. On one core the SDK added more TTFT than a bare aiohttp loop at every concurrency from 16 up (openai 3.62.2: 27 ms at 64, against 0.8 ms for aiohttp), so per-request SDK work costs CPU. And before openai 3.0.0 the SDK used httpx with httpcore 1.x, whose connection pool rescans its connections for every queued request: firing 2,000 requests at once took 155 s with openai 2.46.0 and 6.6 s with openai 3.62.2, which uses httpx2 and httpcore2 (the pool loop was rewritten in httpcore2 2.3.0). With 4,000 at once, openai 2.46.0 got no request to the server within 900 s.
Why does vllm bench serve report "Peak concurrent requests" twice my --max-concurrency?
It counts every request that was active at any moment of a one-second bucket, so a request that ends early in a second and the one that replaces it are both counted. With --max-concurrency 64 it printed 128 in every run while the server never had more than 64 requests open. It is not a bug in the concurrency limit.
Why do guidellm and vllm bench serve report different throughput?
First check that both ran at the same concurrency: vllm bench serve sends every request at once unless you pass --max-concurrency or --request-rate, and guidellm's profiles each choose their own limit. At equal concurrency on one core, both reported the request rate the server measured within 3%, but both under-delivered concurrency from a few hundred streams, so their throughput numbers measure the client there.

Sources