LLM Inference Benchmarks: vLLM vs SGLang vs TensorRT-LLM on a Single L40S
A systematic comparison of three leading LLM inference engines - vLLM, SGLang, and TensorRT-LLM - benchmarked on Qwen3-32B across concurrency scaling, long-context, quantization, and MoE workloads on a single NVIDIA L40S GPU.

LLM Inference Benchmarks: vLLM vs SGLang vs TensorRT-LLM on a Single L40S#
Choosing an inference engine for large language model serving is a decision with direct impact on latency, throughput, and infrastructure cost. This post presents a head-to-head benchmark of three production-grade engines - vLLM, SGLang, and TensorRT-LLM - across four real-world workload scenarios on a single NVIDIA L40S GPU. I specifically chose the L40S because it is a practical, mid-range GPU that is less commonly featured in benchmarks - most published comparisons default to the H100, which may not reflect the hardware teams are actually deploying on. All benchmarks use Nvidia AIPerf for reproducible, standardized measurement.
Update (3 November 2026): Experiments 1-3 were re-measured with an FP8 KV cache and the same KV cache budget on every engine, so all three engines are compared on equal memory. Thanks to a technical reader who pointed out that the engines' default KV cache settings differ enough to decide the ranking.
TL;DR - Summary and Recommendations#

Engine Selection Guide#
All rows except MoE compare the engines with the same FP8 KV cache budget of 35,328 tokens.
| Workload | Best Engine | Why |
|---|---|---|
| High-throughput serving (c32+) | TensorRT-LLM, SGLang close behind | 299 tok/s at c64 vs 283 for SGLang (+5%) and 229 for vLLM (+30%), with all three running about 24 requests at once |
| Streaming quality (smooth tokens) | TensorRT-LLM | Lowest ITL under load at the same batch size: 70 ms at c32 vs 76 ms for SGLang and 99 ms for vLLM |
| Low concurrency, latency-critical | SGLang over vLLM; TensorRT-LLM unclear | At c8 SGLang returned the first token in 2.4 s vs 4.2 s for vLLM under the same request pattern. TensorRT-LLM's 1.1 s came from a different pattern (see Experiment 1) |
| Long-context (8K+ tokens) | SGLang or vLLM at a fixed budget; TensorRT-LLM with its full KV cache | At 35,328 tokens SGLang (49 tok/s) and vLLM (46 tok/s) beat TensorRT-LLM (25 tok/s). Given its full 71,552-token cache, TensorRT-LLM reached 82 tok/s |
| Quantized checkpoints on vLLM | AWQ / GPTQ | 1.44-1.49× the FP8 throughput with the same KV budget and batch size |
| Highest measured throughput | SGLang + MoE | 3.6× throughput using Qwen3-30B-A3B vs dense 32B (SGLang's default KV settings) |
Key Takeaways#
-
With equal KV budgets the engines are close. Every engine levelled off at about 21-24 running requests at c32 and c64, set by the shared 35,328-token budget. TensorRT-LLM led on throughput and ITL, 5% ahead of SGLang at c64. vLLM was 19-23% behind both, mostly because it decodes more slowly per step (ITL 99 ms at the same batch size).
-
How much KV cache each engine reserves matters as much as the engine. At the same 0.90 memory setting, the engines reserved different amounts of FP8 KV cache: vLLM 35,328 tokens, SGLang 60,954 and TensorRT-LLM 71,552. This benchmark caps all three at vLLM's figure to compare the engines themselves. Out of the box, SGLang and TensorRT-LLM would fit about twice as many requests, so a benchmark on default settings compares memory reservation as much as engines.
-
TTFT under load is queueing, not prefill. At c64 every engine took 30-40 s to the first token, and the server metrics show about 28 s of that was waiting for a free slot on both vLLM and SGLang. More concurrency than the KV cache can hold only lengthens the queue.
-
On vLLM, AWQ and GPTQ are faster than FP8 even with the same memory. With the same KV budget and about 24 running requests, the 4-bit checkpoints produced 1.44-1.49× FP8's throughput, with 32-34% lower ITL. That fits decoding reading half as many weight bytes. Measure output quality before making 4-bit the default.
-
MoE models are a game-changer. The Qwen3-30B-A3B model running on SGLang outperforms every dense model configuration across all engines - by a wide margin on serving performance. These runs measure serving performance only, so evaluate output quality separately before treating the models as interchangeable.
Test Environment and Methodology#
All experiments run on a single machine with:
- GPU: NVIDIA L40S 48 GB (AWS g6e.2xlarge), driver 595.71.05, CUDA 13.0
- Model: Qwen3-32B-FP8 (and variants for quantization/MoE tests)
- Engines: vLLM 0.32.0, SGLang 0.5.9, TensorRT-LLM 1.2.1 (TensorRT backend)
- Benchmark tool: AIPerf v0.11.0
- Protocol: OpenAI-compatible
/v1/chat/completionswith streaming enabled - Warmup: 30 requests excluded from results
- Profiling: 300 requests per run
- Input: Synthetic prompts with fixed token lengths (no variance)
Required Software#
- CUDA Toolkit 13 - required by FlashInfer, which SGLang depends on
- NVIDIA-SMI with CUDA 13 driver
python3-dev- needed for building native extensions
Key Metrics#
| Metric | Description |
|---|---|
| Throughput (req/s) | Completed requests per second across all concurrent users |
| Output Token Throughput (tok/s) | Total output tokens generated per second |
| TTFT avg (ms) | Time To First Token - end-to-end time from sending a request to the first streamed token, including queueing, scheduling and prefill |
| TTFT p99 (ms) | 99th-percentile first-token latency: 99% of requests returned their first token at or below this value |
| ITL avg (ms) | Inter-Token Latency - average time between consecutive output tokens |
| Running requests | How many requests were generating tokens at the same time, counted from AIPerf's per-request timestamps over the middle 70% of each run |
Engine Configuration#
Experiments 1-3 use the same settings on every engine wherever the engines expose them:
| Setting | vLLM | SGLang | TensorRT-LLM |
|---|---|---|---|
| KV cache dtype | --kv-cache-dtype fp8 | --kv-cache-dtype fp8_e4m3 | FP8, set at quantization (--kv_cache_dtype fp8) |
| KV budget (35,328 tokens) | --num-gpu-blocks-override 2208 | --max-total-tokens 35328 | kv_cache_config.max_tokens: 35328 |
| Tokens per scheduler step | --max-num-batched-tokens 8192 | --chunked-prefill-size 8192 | --max_num_tokens 8192 (engine build) |
| Max sequence length | --max-model-len 9216 | --context-length 9216 | --max_seq_len 9216 (engine build) |
| Max running requests | default | default | --max_batch_size 64 |
The budget is vLLM's natural FP8 capacity at --gpu-memory-utilization 0.90. Each engine's server log confirms it ran with exactly 35,328 tokens of KV cache. That is room for 27 requests at their full 1,280 tokens in the ISL 1024 runs, and four at 8,520 tokens in the long-context run.
Every request was sent with ignore_eos, and token counts come from the server (--use-server-token-count), so every request generated exactly the requested 256 or 512 tokens on all engines. The full server command and a before/after Prometheus snapshot are saved next to each result.
What still differs between the engines:
- FP8 weights. vLLM and SGLang served Qwen's published
Qwen3-32B-FP8checkpoint. TensorRT-LLM could not load it, so it serves its own FP8 quantization of the BF16Qwen3-32B(see Workarounds). - FP8 kernels. On the L40S (SM89), vLLM 0.32 runs Qwen's block-scaled FP8 checkpoint with a weight-only Marlin kernel (
MarlinFP8ScaledMMLinearKernel), which converts the weights back to BF16 for the matrix multiply. That is likely part of why vLLM is slower in prefill and decode below, though this was not isolated. - Admission and eviction. vLLM admits more requests than the KV cache can fully hold and evicts some when it runs out: it recorded 56-67 preemptions in each c32 and c64 run. SGLang retracted 7 requests per run. TensorRT-LLM reserves the full sequence up front (
GUARANTEED_NO_EVICT) and never evicts. - Prefix caching was on by default in all three engines but did not matter: the prompts are random, vLLM recorded no hits and SGLang reused about 0.3% of prompt tokens.
- Server metrics. vLLM and SGLang export Prometheus metrics, which split TTFT into queue wait and the rest. The TensorRT-LLM backend used here could not, so it only has iteration statistics from its
/metricsendpoint.
Experiment 1: Concurrency Scaling#
Config: Qwen3-32B-FP8, ISL = 1024, OSL = 256, Concurrency = 8 → 32 → 64, FP8 KV cache, 35,328-token budget
This experiment measures how each engine handles increasing concurrent request load - the most common production scaling scenario.

| Framework | Concurrency | Throughput (req/s) | Output (tok/s) | TTFT avg (ms) | TTFT p99 (ms) | ITL avg (ms) |
|---|---|---|---|---|---|---|
| vLLM | 8 | 0.47 | 119.2 | 4,202 | 6,724 | 50.1 |
| vLLM | 32 | 0.90 | 230.3 | 9,181 | 16,569 | 98.5 |
| vLLM | 64 | 0.89 | 228.9 | 40,408 | 63,466 | 99.2 |
| SGLang | 8 | 0.46 | 118.0 | 2,365 | 2,640 | 58.0 |
| SGLang | 32 | 1.10 | 282.1 | 9,080 | 28,291 | 76.1 |
| SGLang | 64 | 1.11 | 283.3 | 34,020 | 53,361 | 77.5 |
| TensorRT-LLM | 8 | 0.47 | 119.4 | 1,122 | 1,824 | 54.7 |
| TensorRT-LLM | 32 | 1.15 | 295.1 | 6,336 | 23,384 | 70.2 |
| TensorRT-LLM | 64 | 1.17 | 298.7 | 30,137 | 46,226 | 71.5 |


Analysis#
TensorRT-LLM leads at scale, narrowly. At concurrency 64 it delivers 299 tok/s, 5% above SGLang (283 tok/s) and 30% above vLLM (229 tok/s). The order is the same at c32. With equal KV budgets all three run about the same number of requests at once (see below), so this gap is per-step speed rather than capacity.
TensorRT-LLM also decodes fastest under load. At c32 its ITL is 70.2 ms, against 76.1 ms for SGLang and 98.5 ms for vLLM, with each engine running 21-25 requests. vLLM's ITL jumped from 50 ms at c8 to 99 ms at c32, while SGLang and TensorRT-LLM rose by about 30%.
Nobody gains anything past c32. All three engines added less than 1.5% throughput from c32 to c64 while TTFT grew 3.7-4.8×. The KV budget was already full at c32, so the extra 32 clients only lengthened the queue.
At c8 throughput is identical, 118-119 tok/s on all three engines, because eight requests fit easily in the cache and the engines spend most of their time decoding. TTFT at c8 differs a lot, but that comparison needs care (see Requests Arriving in Waves).
What Limits Each Engine Under Load#
Once the KV cache is full, new requests wait in a queue until a running one finishes. The table shows how many requests each engine was actually generating for at the same time, counted from AIPerf's per-request timestamps (average over the middle 70% of each run, maximum in brackets):
| Concurrency | vLLM | SGLang | TensorRT-LLM |
|---|---|---|---|
| 8 | 6.0 (max 8) | 6.9 (max 8) | 7.5 (max 8) |
| 32 | 24.0 (max 32) | 21.3 (max 29) | 24.5 (max 26) |
| 64 | 24.0 (max 33) | 21.7 (max 29) | 24.4 (max 26) |
With the same budget, all three engines settle at 21-25 running requests at c32 and c64. vLLM briefly reaches 32 because it admits more requests than fit and then evicts some, while TensorRT-LLM never goes above 26 because it reserves each request's full length up front.
vLLM and SGLang also report how long requests waited before the scheduler first picked them up:
| Qwen3-32B-FP8 | vLLM TTFT | vLLM queue wait | SGLang TTFT | SGLang queue wait |
|---|---|---|---|---|
| c8 | 4.2 s | 0.0 s | 2.4 s | 0.0 s |
| c32 | 9.2 s | 1.4 s | 9.1 s | 4.6 s |
| c64 | 40.4 s | 27.8 s | 34.0 s | 27.2 s |
At c64 both engines spent about 27-28 s of their TTFT waiting for a slot. vLLM's remaining time is spent after it first schedules a request, and at c32 that part (6.0 s on average) includes requests it admitted and later evicted. Either way, TTFT at c32 and c64 measures scheduling and capacity much more than prefill speed.
Requests Arriving in Waves#
TTFT at concurrency 8 turned out to depend on how requests line up in time. Every request generates exactly 256 tokens, so if eight requests start together they also finish together. The client then sends the next eight at the same moment, and the engine has to prefill 8 × 1,024 tokens before any of them gets a first token. Once a run falls into this pattern it stays there.
Counting requests that started within 200 ms of each other shows which runs did this:
| c8 run | Requests starting together (avg) | TTFT avg |
|---|---|---|
| vLLM | 7.9 | 4,202 ms |
| SGLang | 7.9 | 2,365 ms |
| TensorRT-LLM | 4.1 | 1,122 ms |
A run that happens to stay spread out avoids these waves and can show a much lower TTFT on the same engine, so this pattern has to be checked before comparing c8 latency. vLLM and SGLang both ran in full waves of eight, so their comparison is fair: SGLang prefilled the wave about 1.8× faster (2.4 s vs 4.2 s). Switching vLLM's attention backend from FlashInfer to Triton changed its c8 TTFT by less than 4% (4,053 ms), so attention is not the cause; the Marlin FP8 weight path mentioned above is the more likely one. TensorRT-LLM ran in waves of about four, so its 1.1 s is not directly comparable.
Real traffic rarely arrives in synchronized waves, so for low-concurrency latency it is safer to treat these TTFT numbers as a rough ranking and measure with your own arrival pattern.
Experiment 2: Long-Context Performance#
Config: Qwen3-32B-FP8, ISL = 8000, OSL = 512, Concurrency = 8, FP8 KV cache, 35,328-token budget
Long-context workloads (document summarization, RAG with large context windows) stress the prefill pipeline disproportionately. This experiment uses an 8× larger input sequence to reveal engine-level differences in attention computation and memory management.

| Framework | KV budget | Throughput (req/s) | Output (tok/s) | TTFT avg (ms) | TTFT p99 (ms) | ITL avg (ms) | Running requests |
|---|---|---|---|---|---|---|---|
| vLLM | 35,328 | 0.09 | 46.0 | 51,602 | 54,478 | 72.3 | 3.3 |
| SGLang | 35,328 | 0.10 | 48.9 | 48,263 | 53,816 | 68.4 | 3.3 |
| TensorRT-LLM | 35,328 | 0.05 | 25.1 | 82,437 | 85,486 | 155.6 | 3.9 |
| TensorRT-LLM | 71,552 (full) | 0.16 | 81.8 | 5,050 | 14,138 | 87.9 | 7.5 |
The last row is a shorter run (24 requests after the usual 30 warmup requests) with TensorRT-LLM's full FP8 KV cache, added to explain the third row.
Analysis#
At the shared budget, SGLang and vLLM win and TensorRT-LLM falls well behind. Each request needs about 8,520 tokens of KV cache, so 35,328 tokens fit four of them and the other four clients always wait. vLLM and SGLang both ran about 3.3 requests at a time and delivered 46-49 tok/s. Their TTFT is almost all queueing: vLLM waited 39.8 s and SGLang 41.4 s of their roughly 50 s average.
TensorRT-LLM decodes long sequences slowly when only a few are running. Its iteration statistics show each decode step taking a median 145 ms with four long sequences in the batch at the 35,328-token budget. With its full cache it ran eight sequences at once and each step took 69 ms, and steps with only two or three long sequences took 100-150 ms in both runs. More sequences finishing faster per step is the opposite of what batching normally does. The shorter capped run reproduced the 155 ms ITL, and turning off TensorRT-LLM's multi-block attention mode did not change it (154 ms), so the cause was not identified. In practice, TensorRT-LLM needs enough KV cache to batch several long requests together.
Given its full KV cache, TensorRT-LLM was the fastest long-context engine here, at 82 tok/s with a 5 s average TTFT. Its full cache is what TensorRT-LLM reserves by default, so out of the box it handles this workload well; it just is not running on the same memory as the others.
Experiment 3: Quantization Comparison#
Config: vLLM, Concurrency = 32, ISL = 1024, OSL = 256, FP8 KV cache, 35,328-token budget
This experiment holds the inference engine constant (vLLM) and varies only the model checkpoint: FP8 vs AWQ vs GPTQ. The 4-bit checkpoints have smaller weights and would normally get a larger KV cache, so all three are capped at the same 35,328-token budget to separate the checkpoint from the memory.

| Model | Throughput (req/s) | Output (tok/s) | TTFT avg (ms) | TTFT p99 (ms) | ITL avg (ms) | Running requests |
|---|---|---|---|---|---|---|
| Qwen3-32B-FP8 | 0.90 | 230.3 | 9,181 | 16,569 | 98.5 | 24.0 |
| Qwen3-32B-AWQ | 1.30 | 332.7 | 6,864 | 12,334 | 66.8 | 23.4 |
| Qwen3-32B-GPTQ-Int4 | 1.34 | 342.5 | 6,520 | 11,358 | 65.4 | 23.5 |
The checkpoints are Qwen/Qwen3-32B-FP8, Qwen/Qwen3-32B-AWQ and JunHowie/Qwen3-32B-GPTQ-Int4 (4-bit, group size 128).
Analysis#
With the same memory, the 4-bit checkpoints are still much faster. AWQ delivers 1.44× and GPTQ 1.49× the FP8 throughput, while all three run about 24 requests at once. The gain comes from decoding: ITL drops from 98.5 ms to 65-67 ms, a 1.47-1.51× speedup that matches the throughput gain. The equal budget matters here: without it the 4-bit checkpoints would also get a much larger KV cache from their smaller weights, and the comparison would mix decode speed with batch size.
Why 4-bit decodes faster here. Each decode step reads every weight once, so with batches this small the step time is dominated by how many bytes of weights are read. The 4-bit checkpoints have about half the weight bytes of FP8. On the L40S, vLLM also runs Qwen's FP8 checkpoint through a weight-only Marlin kernel, so FP8 does not get a compute advantage in exchange. vLLM uses Marlin kernels for AWQ and GPTQ too, which makes this mostly a weight-size comparison.
AWQ and GPTQ are close. GPTQ is 3% ahead on throughput, within what a single run can resolve.
TTFT and tail latency follow. FP8's TTFT is 9.2 s against 6.5-6.9 s, and its p99 is 16.6 s against 11.4-12.3 s. At c32 part of this is queueing (FP8 waited 1.4 s on average, the 4-bit checkpoints 0.9 s) and part is FP8's slower steps.
This is serving speed only. Output quality was not measured, and 4-bit quantization costs more accuracy than FP8. Evaluate quality before making 4-bit the default.
Experiment 4: MoE Model - Qwen3-30B-A3B#
Config: SGLang, Concurrency = 32, ISL = 1024, OSL = 256
Mixture-of-Experts (MoE) models activate only a subset of parameters per token, promising higher throughput with lower compute. This experiment compares the dense Qwen3-32B-FP8 against the MoE Qwen3-30B-A3B-FP8, both served by SGLang.
Unlike Experiments 1-3, this experiment uses SGLang's default BF16 KV cache with no budget cap, so its two rows compare with each other but not with the tables above.

| Model | Throughput (req/s) | Output (tok/s) | TTFT avg (ms) | TTFT p99 (ms) | ITL avg (ms) |
|---|---|---|---|---|---|
| Qwen3-32B-FP8 (Dense) | 0.97 | 249.1 | 12,332 | 27,517 | 76.6 |
| Qwen3-30B-A3B-FP8 (MoE) | 3.51 | 897.4 | 779 | 1,303 | 31.1 |
Analysis#
The MoE model delivers a transformative performance advantage. Qwen3-30B-A3B activates only 3B parameters per token out of its total 30B, resulting in:
- 3.6× higher request throughput (3.51 vs 0.97 req/s)
- 3.6× higher token throughput (897 vs 249 tok/s)
- 15.8× faster average TTFT (779 ms vs 12,332 ms)
- 2.5× lower inter-token latency (31.1 ms vs 76.6 ms)
Part of the difference is memory as well: the MoE run kept almost all 32 requests generating (28.9 on average), against about 19 for the dense model. Its 3.6× throughput combines a roughly 1.5× larger batch with 2.5× lower ITL per request.
These are the largest performance differences observed across all experiments. The MoE architecture fundamentally changes the compute profile - with only 3B active parameters, the model effectively runs like a much smaller dense model. This benchmark measures serving performance only, not answer quality, so a separate evaluation is needed before treating the two models as interchangeable.
Sub-second TTFT at c32 is a standout result. The MoE model achieves 779 ms average TTFT even at concurrency 32, with a p99 of 1,303 ms, which makes it viable for real-time, latency-sensitive applications at high concurrency.
Limitations#
These numbers come from one machine and one benchmark harness, and they are a starting point for choosing an inference stack rather than a universal ranking of engines:
- Each configuration was measured once. Run-to-run variability is not reported, so differences of a few percent should not be read as meaningful.
- The KV budget was set to what vLLM can hold, which is the smallest of the three. A larger shared budget would let every engine batch more requests, and the ranking at high concurrency could change.
- TensorRT-LLM served its own FP8 quantization of the BF16 model, not the same FP8 weights as vLLM and SGLang.
- The cause of TensorRT-LLM's slow long-context decoding with few sequences, and of vLLM's slower prefill, was not identified.
- The TensorRT-LLM backend used here exports no Prometheus metrics, so its TTFT cannot be split into queue wait and prefill.
- The MoE experiment uses SGLang's default KV settings, not the shared budget.
- No requests failed in any run.
- Output quality was never measured. Every comparison here is about serving performance.
Before making a production decision, benchmark your own model, prompt-length distribution, concurrency, latency SLOs, output quality and infrastructure cost.
Reproducing These Benchmarks#
All benchmark configurations, run scripts, and raw result JSON files are available in the accompanying repository. Each framework has its own workspace directory with a run_*.py script and a README.md with step-by-step instructions.
Experiments 1-3 use the driver in equal-kv-budget/, which starts one engine, runs every configuration against it and saves the server command, server log, Prometheus snapshots and engine statistics with each result:
# Run all four configurations against SGLang with a 35,328-token FP8 KV budget
python equal-kv-budget/orchestrate.py sglang --budget 35328The raw AIPerf exports for these runs are in aiperf-workspace/results_matched/, the diagnostic runs mentioned above are in aiperf-workspace/results_diag/, and the MoE runs are in aiperf-workspace/results/. Each contains full statistical distributions (avg, p1-p99, min, max, std) for every metric - far more detail than the summary tables presented here.
TensorRT-LLM: Workarounds Applied#
Two issues required workarounds when benchmarking TensorRT-LLM:
-
Token counting mismatch. AIPerf was not counting tokens correctly when targeting TensorRT-LLM's OpenAI-compatible endpoint. The fix was to pass
--use-server-token-countand--ignore_eosto theaiperf profilecommand, which delegates token counting to the server and prevents early termination on EOS tokens. Both flags are used for every engine. -
FP8 checkpoint incompatibility. The pre-quantized
Qwen3-32B-FP8checkpoint did not load correctly in TensorRT-LLM due to a configuration issue. To work around this, thetensorrt-llm-workspace/run_trtllm.pyscript was extended to first download the unquantized Qwen3-32B model and then quantize it to FP8 at build time, with an FP8 KV cache. As a result, TensorRT-LLM serves different FP8 weights from vLLM and SGLang.
If you run into questions or issues while reproducing these benchmarks, please open an issue on GitHub.