Incident lab: throughput falls 40% as concurrency rises
A pre-launch load test shows successful tokens per second climbing to a peak and then falling about 40% as clients are added. Separate useful from generated tokens, find where the KV cache caps the replica, show how client timeouts and retries turn queueing into wasted GPU work, and fix it with admission control before raising capacity.
By Sandip Maity, Applied AI Engineer
Key takeaways
- A healthy replica's throughput rises to a plateau and stays there; a curve that bends down means work is being wasted.
- Compare useful tokens (from requests that completed) with generated tokens: if the GPU stays busy while useful output falls, it is working for clients that already gave up.
- Past the point where the KV cache is full, extra requests only queue; with client timeouts and retries the queue turns into congestion collapse.
- The first fix is admission control sized to what the replica can run: a fast 429 is cheaper than a request that times out after using the GPU.
- Lowering max_num_seqs alone does not help when requests time out in the queue; the queue just moves.
Goal: explain a load-test curve that goes the wrong way, find what is responsible, and decide what must change before launch.
You need: the simulator from How to work an inference incident and about 45 minutes. Background: benchmarking done properly and client timeouts, retries and SDKs.
Honest limits. In the simulator, an aborted request frees its KV cache at once and the client resends immediately. Real clients add back-off and jitter, and real engines take a moment to notice a disconnect. The shape of the curve is general; the exact numbers are not.
#The brief
$ python3 incident_sim.py concurrency brief
LOAD TEST before launch. Same replica, closed-loop clients with no think time, the production SDK's
settings. Successful output tokens per second climb to a peak and then FALL as you add clients: about
40% below the peak by 40 clients, worse beyond. Explain the curve, find what is responsible, and say
what you would change before launch.
Start with: sweep, then dashboard and metrics, then changes and startup-log.#Step 1: the sweep
$ python3 incident_sim.py concurrency sweep
Closed-loop concurrency sweep: Throughput falls about 40% as concurrency rises
useful = output tokens per second of requests that completed; generated = all tokens the GPU produced
clients useful tok/s generated TTFT p50 running KV used preempt/min timeouts/min 429/s
4 65 65 486 ms 4.0 28% 0.0 0.0 0.0
8 118 118 525 ms 8.0 57% 0.0 0.0 0.0
12 160 156 544 ms 11.9 83% 0.9 0.0 0.0
16 160 159 6.49 s 13.4 95% 6.6 0.0 0.0
24 142 163 23.59 s 14.3 97% 11.5 1.6 0.0
32 110 156 40.72 s 13.9 96% 9.5 6.1 0.0
48 60 153 55.57 s 14.7 95% 8.3 19.9 0.0
64 42 151 56.33 s 14.9 93% 7.1 32.9 0.0
128 41 151 54.45 s 15.3 94% 8.4 73.6 0.0Before you read on: where is the peak, how far does useful throughput fall by 40 and by 64 clients, and what happens to the generated column while it falls?
The rest is Pro
Keep reading this full lab
Pro unlocks this full lab, including 1 animated diagram, every advanced lesson, the hands-on labs and completion certificates.
One year
$25
365 days, no auto-renewal
Lifetime Best value
$75
pay once, keep it forever
7-day refund, no questions asked. One payment, no auto-renewal.Compare plansHave a licence key?
Not ready? Keep learning free
Free lessons from Incident Labs, no sign-up. Or follow the free roadmap →
Not ready? Take the free 5-day email course
One short email a day for five days, each built on a free lesson, then the occasional new lesson or offer. Unsubscribe in one click.
Still to come in this lab
- Step 2: read the two throughput columns
- Step 3: compare with the dashboard and metrics
- Step 4: what caps the replica, and what changed?
- Step 5: the mechanism, congestion collapse
- Step 6: compare the fixes
- Step 7: the launch decision
- On a real system
- Checklist
- Exercise
- Going deeper
You will be able to answer
- Useful tokens per second fell from 160 to 94 while generated tokens per second stayed near 160. What does that mean?
- Why does the curve flatten around 12 to 16 clients even before any timeouts?
- Which change keeps useful throughput at the peak with 40 clients?
- In the 40-client run, completed requests had a mean output of 302 tokens against about 400 at 16 clients. Why?