Scenario

A rate sweep that never reached steady state

L4StaffIncident30 minSystem designDebuggingML depth

RolesInference EngineeringAI Evaluation and ReliabilityLLM Product Engineering

Engine
vLLM 0.31.0 and SGLang 0.5.22
Model
Qwen/Qwen3-8B
Hardware
one L4 with 24 GB of memory

Situation

A platform team must size a fleet of L4 cards for a new chat API. They run a rate sweep against one card with Qwen/Qwen3-8B: requests arrive at a fixed rate from 0.5 to 16 per second, each request with a 512-token prompt and a 128-token answer. Every run completes and no request fails. The output rises to 286.6 tokens per second at 4 per second and is still 205.8 at 16. The capacity report concludes that one card can take 16 requests each second, so the fleet plan divides the expected peak by 16.

You get the report the evening before the purchase order goes out. It shows throughput per rate and the median wait for the first token at each rate, and it labels that column "latency under load, expected". Nothing in the report says how long each run lasted or what the GPU clock did.

Questions

  1. Which column of the report proves that the card kept up with the arrivals, and at which rate does that proof stop?
  2. A closed loop at 64 users and an open loop at 16 per second both complete. What is different about the queue in the two cases?
  3. The median first token at 16 per second was 94,322 ms. What would that number be if the run had lasted twice as long, and why?
  4. Read the two log lines. How many requests ran and how many waited on each engine, and what set that limit?
  5. Define the capacity of this card for a target of one second and 100 ms, from the evidence.
  6. Write the rate test you would run instead, and the stopping rule that tells you a point is above capacity.

Commit to a cause after each listing. Write it down before you read the next one.

Evidence

1/7

the L4 rate sweep from 0.5 to 16 requests per second

Follow the median TTFT column down the table, then read the output and the clock columns.

evidence/rate-sweep-table.txt
### L4, rate: requests each second, 512 prompt and 128 output tokens

| Rate | Config | Output tok/s (min to max) | Median TTFT | Median TPOT | P99 ITL (min to max) | Median SM clock |
|---|---|---|---|---|---|---|
| 0.5 | `vllm` | 70.6 (67.2 to 92.3) | 317 ms | 72.7 ms | 214 (208 to 215) ms | 1,485 MHz |
| 0.5 | `sglang` | 70.6 (67.2 to 92.3) | 284 ms | 74.7 ms | 235 (234 to 235) ms | 1,485 MHz |
| 1 | `vllm` | 123.6 (118.4 to 154.5) | 180 ms | 68.2 ms | 77 (77 to 79) ms | 1,485 MHz |
| 1 | `sglang` | 123.3 (118.4 to 153.6) | 166 ms | 74.0 ms | 114 (113 to 166) ms | 1,500 MHz |
| 2 | `vllm` | 227.8 (216.5 to 231.8) | 233 ms | 88.7 ms | 355 (351 to 358) ms | 1,418 MHz |
| 2 | `sglang` | 226.3 (215.5 to 230.1) | 221 ms | 99.9 ms | 387 (384 to 429) ms | 1,433 MHz |
| 4 | `vllm` | 286.6 (283.7 to 291.7) | 8,304 ms | 126.9 ms | 621 (620 to 627) ms | 1,245 MHz |
| 4 | `sglang` | 257.5 (254.9 to 259.7) | 9,575 ms | 115.1 ms | 680 (383 to 811) ms | 1,350 MHz |
| 8 | `vllm` | 261.8 (259.4 to 264.3) | 27,510 ms | 126.0 ms | 1,184 (1,089 to 1,361) ms | 1,035 MHz |
| 8 | `sglang` | 253.9 (250.7 to 260.7) | 37,211 ms | 105.2 ms | 277 (259 to 317) ms | 1,215 MHz |
| 16 | `vllm` | 205.8 (204.8 to 208.4) | 94,322 ms | 185.2 ms | 1,448 (1,448 to 1,483) ms | 450 MHz |
| 16 | `sglang` | 218.2 (215.6 to 229.0) | 97,542 ms | 115.2 ms | 137 (120 to 163) ms | 600 MHz |

Source: manuals/vllm-101/sections/r-7-lab-notes.md, lines 81-96

2/7

what a fixed request rate does that a closed loop cannot

Read the second paragraph: past the rate the server can serve, the queue grows with every request.

evidence/closed-loop-against-fixed-rate.txt
## Choose a closed loop or a fixed rate

`--max-concurrency` keeps a fixed number of users busy. When the server slows down, the users send their next request later, so the load drops by itself. This closed loop never falls behind.

`--request-rate` sends requests at a fixed rate, whether the server keeps up or not. Past the rate the server can serve, the queue grows, and the first token takes longer with every request. Real traffic behaves more like a fixed rate. Run both before you set a capacity limit.

Source: manuals/vllm-101/sections/5-1-benchmark-your-server-in-15-minutes.md, lines 115-119

3/7

the run length of the rate sweep

The last sentence gives the run length: at least 32 prompts, or 30 seconds of arrivals.

evidence/how-long-each-run-lasted.txt
### The same pair at a fixed arrival rate

A closed loop sends a new request only when one comes back, so the engine sets the pace. Production traffic does not wait for the engine. We ran the rate sweep of [section 5.1](#s-sglang-benchmark-serving) on the same pair, with the same pools and the same rules for heat and clock. Requests arrived at a Poisson rate from 0.5 to 16 per second, with 512 input and 128 output tokens. Each run sent at least 32 prompts, or 30 seconds of arrivals.

Source: manuals/sglang-101/sections/5-3-reading-other-peoples-benchmarks.md, lines 199-201

4/7

the SGLang pool and one decode line with requests waiting

Count the running requests, the queued requests and the token usage in the second line.

evidence/sglang-under-the-rate.txt
[2026-10-18 00:43:57] KV Cache is allocated. dtype: torch.bfloat16, #tokens: 24094, K size: 1.65 GB, V size: 1.65 GB
[2026-10-18 03:13:55] Decode batch, #running-req: 37, #token: 22424, token usage: 0.93, cuda graph: True, gen throughput (token/s): 370.33, #queue-req: 71

Source: manuals/sglang-101/capture/gpu/out-l4/server-h2h-rate-sglang.log

5/7

the vLLM pool and one stats line with requests waiting

Count the running and the waiting requests, and read the KV cache usage.

evidence/vllm-under-the-rate.txt
INFO 10-18 03:15:35 [kv_cache_utils.py:2464] GPU KV cache size: 24,096 tokens, Maximum concurrency for 8,192 tokens per request: 2.94x
INFO 10-18 06:10:22 [loggers.py:320] Engine 000: Avg prompt throughput: 1326.7 tokens/s, Avg generation throughput: 158.4 tokens/s, Running: 43 reqs, Waiting: 30 reqs, GPU KV cache usage: 99.7%, Prefix cache hit rate: 0.6%

Source: manuals/sglang-101/capture/gpu/out-l4/server-h2h-rate-vllm.log

6/7

which rates kept up, which met the target, and which row the manual refuses to compare

Find the rate from which no request met the target, then the reason the row at 16 is not compared.

evidence/goodput-by-rate.txt
**We measured** a tie up to 2 requests per second. Both engines kept up with the arrivals, so throughput was within 1 percent. SGLang gave the first token sooner at 0.5 and 1 per second, outside the seed spread. The medians were 284 against 317 ms and 166 against 180 ms. vLLM had the shorter time per token. It was 68 against 74 ms at 1 per second, outside the spread, and 89 against 100 ms at 2.

Goodput shows what that means for a target. We set the target at 1 s to the first token and 100 ms per token. At 2 requests per second, vLLM served a median of 1.36 requests per second within the target, and SGLang 0.88. The seed ranges overlapped, 1.09 to 1.44 against 0.54 to 1.18. The SGLang median time per token was 99.9 ms, on the line of the target.

From 4 requests per second, both engines fell behind the arrivals, and no request met the target. The stats lines show the same admission choice as in the closed loop. SGLang ran 37 requests with the pool 93 percent full. The vLLM server ran 43 requests and filled 99.7 percent of its pool.

At 4 per second, vLLM gave 286.6 against 257.5 tok/s, 11 percent more and outside the seed spread. Its median first token came at 8.3 against 9.6 s, but those seed ranges overlapped. The cost was the stream: its P99 time per token was 187 against 127 ms, outside the spread.

The clock does not explain the gap at 4. The vLLM runs had the lower median clock, 1,245 against 1,350 MHz. At 8 per second the throughput ranges overlapped. At 16 per second, every run of both engines stayed under 1,000 MHz after three tries, so we do not compare that row.

Source: manuals/sglang-101/sections/5-3-reading-other-peoples-benchmarks.md, lines 240-248

7/7

completed requests per second as the offered rate rose past the peak

Read the completed rate at 4, 8 and 16 offered, then the clock and the thermal share.

evidence/overload-cost-throughput.txt
**We measured** a different shape on the smaller card. Both servers met the target for every request up to 1 per second. BF16 held 0.88 within the target at 2 offered and none from 4. FP8 held 3.18 within the target at 4 offered, three times the best BF16 point. The FP8 server also had a pool of 142,369 tokens against 24,094 for BF16. From 4 offered, the BF16 pool was the limit.

Past its peak, BF16 completed fewer requests as we offered more: 2.01 per second at 4 offered, 1.91 at 8, and 1.62 at 16. The telemetry shows why. The median SM clock fell from 1,320 MHz at 4 offered to 465 MHz at 16. At 16, 70 percent of the samples showed thermal slowdown. On our passively cooled L4, overload cost throughput as well as latency.

Source: manuals/sglang-101/sections/5-1-sglang-benchmark-serving.md, lines 325-327

The answer

Show the walkthrough
  1. Read the table as a time series, not as a list of points. Up to 2 per second the output grows with the rate: 70.6 at 0.5, 123.6 at 1 and 227.8 at 2 for vLLM, and the median TTFT stays between 180 and 317 ms. The server finishes work as fast as it arrives. At 4 per second the output is 286.6 and the median TTFT is 8,304 ms. At 8 the pair is 261.8 and 27,510 ms, and at 16 it is 205.8 and 94,322 ms. The output peaked at 4 and then fell, while each doubling of the rate multiplied the first token by more than three. The clock column falls from 1,245 MHz at 4 to 450 MHz at 16.
  2. Name the loop. The second listing separates the two kinds of load test. A closed loop with a fixed number of users never falls behind, because a user sends the next request only after the answer. A fixed rate keeps sending whether the server keeps up or not. Past the rate the server can serve, the queue grows, and the first token takes longer with every request. From 4 per second, the first-token column of the report measures queue time.
  3. Ask how long the run was. The third listing gives the run length: at least 32 prompts, or 30 seconds of arrivals. A median TTFT of 94,322 ms from a run with 30 seconds of arrivals means that the typical request waited longer than the whole arrival window. The queue was still growing when the last request arrived. Run the same rate for twice as long and the median grows, because every extra second of arrivals adds work that the server cannot drain. The number is a property of the run length, not of the card. That is what a point above capacity looks like: the latency never settles.
  4. Count who ran and who waited. SGLang ran 37 requests with 71 in its queue and the pool 93 percent full. vLLM ran 43 requests with 30 waiting and 99.7 percent of its pool in use. The pools hold 24,094 and 24,096 tokens, so about forty requests of 512 plus 128 tokens fit at once. Everything that arrives faster than those slots free up waits. The engines differ only in how many they admit before they queue.
  5. Define capacity from goodput. The manual set two limits, 1 s to the first token and 100 ms per token. At 2 per second, vLLM served a median of 1.36 requests per second within those limits and SGLang 0.88, with overlapping seed ranges. From 4 per second, no request met them on either engine. So the card sustains that target somewhere between 2 and 4 per second, and the number to plan with is 2. The row at 16 is not even comparable: every run of both engines stayed under 1,000 MHz after three tries, so the manual does not compare it.
  6. Count what overload cost. The last listing is the same card in the open loop of the SGLang manual. Past its peak, the BF16 server completed fewer requests as more were offered: 2.01 per second at 4 offered, 1.91 at 8 and 1.62 at 16. The median SM clock fell from 1,320 MHz at 4 offered to 465 MHz at 16, and 70 percent of the samples showed thermal slowdown. On this passively cooled card, overload is not free. It heats the GPU, the clock falls, and the server completes less than it did at a lower rate.
Show the resolution

The report mistook completion for capacity. A fixed-rate run always completes, because the client stops sending at the end of its arrival window and the server drains the queue afterwards. The first-token column from 4 per second up is the length of that queue, and at 16 per second it reached 94,322 ms after 30 seconds of arrivals. The card never served 16 requests per second within any latency target. It served about 2 per second within the target of 1 s and 100 ms, with vLLM at 1.36 and SGLang at 0.88 requests per second of goodput at an offered 2.

The peak is divided by 2, not by 16, before any headroom. The test changes in four ways. Run each rate long enough to see whether the first token settles; if the median TTFT rises when you extend the run, the rate is above capacity and the number is meaningless. Report goodput per offered rate against your own target, next to the throughput. Record the SM clock and the temperature, and repeat or discard any point that fell under the clock floor, as the manual did for the row at 16. Run the closed loop too, because the closed loop finds the knee by user count and the open loop finds the rate the card sustains, and a plan needs both.

Show the wrong turns
  • “Every run finished, so the card handles 16 per second.”

    A fixed-rate client stops sending at the end of its window and the server drains the queue afterwards. Completion is guaranteed. The 94,322 ms median first token is the queue, not the service.

  • “Output was still 205.8 tokens per second at 16, so throughput held.”

    Output fell from 286.6 at 4 per second to 205.8 at 16 while the clock fell from 1,245 to 450 MHz. The server did less work at the higher rate, and the open loop of the SGLang manual shows the same fall in completed requests per second.

  • “Take the TTFT at 16 as the worst case users will see.”

    That value depends on how long the test ran. Extend the run and it grows. A number that grows with the run length describes the test, not the server.

  • “Switch to the engine with the lower TTFT at 8 per second.”

    At 8 per second both engines were far past capacity, 27,510 against 37,211 ms. Choosing between two overloaded servers by their queue length is not a capacity decision.

Show the general rule

A system above its service rate has no steady state, so every latency you measure there is a function of how long you measured. Capacity is the highest offered rate at which the latency settles and the goodput holds, found with an open loop that runs long enough to prove the settling, and confirmed with a closed loop for the user count. Completion, throughput and a median taken from a growing queue are not capacity.

Taught in

The vLLM manual gives the sweep in the lab notes and the two loops in the benchmark page, the SGLang manual reads the same pair at a fixed arrival rate and runs its own open loop in the benchmark serving page, and the inference metrics lesson defines goodput while the load testing lesson names the four load patterns.