What this comparison helps you decide

Serving-engine choice is often treated as the central performance decision in self-hosting. For a team paying for GPU hours, the practical question is narrower. If hardware, model and traffic stay fixed, how much does the engine change cost? And what is the impact on user experience?

These three field tests use one NVIDIA A40 per engine to serve Qwen2.5-7B-Instruct with default engine settings. The full reports and raw data are available for vLLM on the A40, SGLang on the A40 and TensorRT-LLM on the A40.

It is written for three groups:

  • teams choosing an engine to standardise on;
  • budget owners deciding where optimisation effort pays;
  • anyone building an interactive product where a stutter mid-reply matters.

The model-serving guide explains the measurements.

What stayed fixed

Each field test used the same workload and GPU model. The physical cards and regions varied across the runs.

Swipe or scroll horizontally to compare every column.

The conditions shared by all three A40 field tests.
Held fixedValue
GPUOne NVIDIA A40 48 GB, RunPod Secure Cloud, on-demand
Cost basisRounded $0.60 per hour
ModelQwen/Qwen2.5-7B-Instruct in BF16
Request shapeRandom prompts, 512 input and 256 output tokens
Load generatorvllm bench serve 0.34.0 on the same Pod
Load levelsConcurrency 1, 8, 32 and 64
Engine settingsDefaults, with no tuning
Published runThe second of two identical sweeps: the same prompts as the first, with each engine's prefix cache on, so results reflect a warm cache

Throughput and cost stayed within 3%

Swipe or scroll horizontally to compare every column.

Output throughput and derived GPU cost per million output tokens from each engine's second sweep, with a warm prefix cache. The percentage compares each engine with vLLM at the same load.
ConcurrencyvLLM tok/sSGLang tok/sTensorRT-LLM tok/sSpread$ / 1M output range (derived)
135.235.7 (+1.4%)34.9 (−0.9%)2.3%$4.68 to $4.78
8262.9265.7 (+1.1%)260.8 (−0.8%)1.9%$0.627 to $0.639
32862.9872.8 (+1.1%)869.4 (+0.8%)1.1%$0.191 to $0.193
641,449.21,453.3 (+0.3%)1,490.0 (+2.8%)2.8%$0.112 to $0.115

No engine led at every load. SGLang was slightly ahead at low and medium load, and TensorRT-LLM was ahead at full load.

The largest gap was 2.8%, worth less than half a cent per million output tokens. It was smaller than the differences the prefix cache made between engines, so treat the ranking as a tie.

The larger lever was utilisation. On vLLM, moving from one request at a time to 64 cut derived cost by a factor of about 41. It fell from $4.74 to about $0.115 per million output tokens, and the other engines moved by a similar factor.

With new prompts the full-load cost is higher. Measured on the later A40, the factor was about 34. That still dwarfs the engine choice. An idle hour costs $0.60 under every engine.

What the prefix cache changed

All three tests used the same random prompts with a fixed seed. Each load level reused the prompts of the level before it, and the published second sweep repeated the first exactly.

Every engine had prefix caching on by default. So a large share of the prompt processing in the published runs was served from cache. The figures above describe a warm cache, rather than traffic in which every prompt is new.

To measure the effect, all three engines ran again with both methods. They shared one card at a time: first an RTX 6000 Ada, later a second A40. On each card the cold sweep used new prompts at every level on a freshly started server.

The second A40 was about 20% faster than the cards in these tests. The most likely reason is that it had error-correcting code (ECC) memory protection off. Read its percentage changes rather than its absolute figures.

Swipe or scroll horizontally to compare every column.

RTX 6000 Ada results at concurrency 64: the A40 method (warm cache, second sweep) against new prompts at every level (cold). All three engines ran on the same physical card.
EngineWarm tok/sCold tok/sChangeCold p99 TTFTCold p99 ITL
vLLM2,095.21,633.1−22.1%4,316 ms286.6 ms
SGLang2,042.21,646.3−19.4%4,088 ms28.2 ms
TensorRT-LLM2,077.01,654.5−20.3%4,129 ms76.2 ms

Swipe or scroll horizontally to compare every column.

Results at concurrency 64 on one later A40 (ECC off): the A40 method (warm cache, second sweep) against new prompts at every level (cold). All three engines ran on the same physical card.
EngineWarm tok/sCold tok/sChangeCold p99 TTFTCold p99 ITL
vLLM2,031.71,411.3−30.5%4,209 ms286.1 ms
SGLang1,667.51,394.5−16.4%4,259 ms43.9 ms
TensorRT-LLM1,732.41,436.3−17.1%4,198 ms116.5 ms

vLLM's larger change on the later A40 came from its second warm sweep. That sweep was 21% faster than its first, most likely because more of the first sweep's prompts were still in cache. Against its first sweep, cold throughput was 16% lower, in line with the other engines.

On the A40s in these tests the two warm sweeps were within 1%. So about a sixth is the better guide to the cold effect here. Full-load cost would rise from about $0.11 to $0.14 per million output tokens.

  • Throughput at high load was flattered by a sixth to a fifth for every engine on both cards. At concurrency 1 the cache made under 1% of difference.
  • The engine tie held. With cold prompts at full load, the three finished within 3% of each other on the later A40. On the RTX 6000 Ada they were within 1.3%.
  • The streaming difference held. With cold prompts at the two highest loads, vLLM's slowest gaps stayed near 280 milliseconds. SGLang's stayed under 30.
  • The first-token ordering changed. With cold prompts at the two highest loads, the three engines' p99 time to first token was within about 7%.

The engines' own counters confirm the cause. vLLM's last logged prefix cache hit rate was 59% after the standard runs. After the cold run it was 0.4%. The full results are in the prefix-cache check notes.

Streaming smoothness separated the engines

Throughput measures output. Inter-token latency measures whether a streamed answer arrives steadily or pauses mid-sentence.

Swipe or scroll horizontally to compare every column.

p99 inter-token latency, the slowest 1% of gaps between streamed tokens, from each engine's second sweep on the A40.
ConcurrencyvLLMSGLangTensorRT-LLM
129.8 ms28.4 ms36.9 ms
833.2 ms30.5 ms37.3 ms
32273.5 ms33.3 ms66.9 ms
64293.5 ms44.1 ms58.8 ms

At high load, vLLM's slowest gaps approached 300 milliseconds. SGLang stayed below 45 milliseconds, and TensorRT-LLM sat between the two.

The typical token was similar under every engine. At full load, median time per output token was 35.6 milliseconds for SGLang. It was 35.8 for TensorRT-LLM and 38.9 for vLLM. Averages alone would hide the difference users can feel.

Why the schedulers probably behaved differently

All three behaviours are documented defaults, and all three can be changed.

Time to first token depended on the warm cache

Swipe or scroll horizontally to compare every column.

Median and p99 time to first token for each engine and load level, from the second sweep on the A40, with a warm prefix cache.
ConcurrencyvLLM median / p99SGLang median / p99TensorRT-LLM median / p99
1107 / 129 ms94 / 112 ms98 / 116 ms
8151 / 604 ms114 / 590 ms116 / 582 ms
32830 / 1,387 ms1,203 / 2,167 ms861 / 1,833 ms
64665 / 3,116 ms290 / 4,260 ms495 / 4,112 ms

With a warm prefix cache, vLLM had the shortest worst-case wait to begin at concurrency 32 and 64. SGLang had the longest. In the cold checks at concurrency 64 that ordering disappeared, with p99 time to first token of:

  • RTX 6000 Ada: 4.3 seconds for vLLM, and 4.1 for both SGLang and TensorRT-LLM;
  • later A40: 4.2 seconds for vLLM and TensorRT-LLM, and 4.3 for SGLang.

I treat the original A40 gap as specific to the warm-cache setup. Time to first token is the metric the prefix cache changes most. Measure it with traffic that repeats prompts as often as yours does.

Operational work changed even when cost did not

Swipe or scroll horizontally to compare every column.

Start-up and runtime facts recorded from each engine's own evidence. Image pull time was not measured consistently and is excluded.
Recorded factvLLM 0.34.0SGLang 0.5.23TensorRT-LLM 1.2.1
Install routepip into a virtual environmentpip into a virtual environmentNVIDIA release image, about 16 GB compressed
Container disk50 GB (inferred from the disk rate)50 GB100 GB
KV cache reserved505,856 tokens428,234 tokens470,428 tokens
Server ready timeNot recordedAbout 110 sAbout 64 s
Decode CUDA graphsEngine defaultBatch 1 to 32Batch 1 to 32, 64 and 128
First-sweep anomalyNone recordedOne 7.6 s first-token stall at concurrency 8One first-token wait of about 96 s at concurrency 1, repeated on two more cards

All three reserved far more KV cache than this workload needed. Each request here holds 768 tokens. Even 64 concurrent requests use under 50,000. The differences come from each engine's default memory fraction. They would matter only with longer prompts or many more concurrent users.

TensorRT-LLM asked the most of the operator. It needed a larger image and twice the disk, and its first request waited about a minute and a half. That stall repeated on an RTX 6000 Ada at 81 seconds and on a later A40 at 75 seconds.

A throughput table leaves all of that out. It still shows up in the bill and in a new server's first minutes.

Self-hosted or API: the engine does not move the line

The break-even against a managed API is set by the GPU's hourly rate and the API price. The engine plays no part.

On 20 November 2026, I recorded an OpenRouter list price for this model. It was $0.10 per million input tokens and $0.20 per million output tokens. A later check left the price unverified, so I use it here as a historical reference.

At that rate, a rented A40 becomes cheaper above about 1.6 requests per second sustained, under any of the three engines. Take a modelled lower API price of $0.04 and $0.10. The line then moves to about 3.6 requests per second.

break-even requests per second = hourly GPU cost ÷ (API cost per request × 3,600)

The vLLM A40 report explains the calculation and its cautions.

Which engine to test first

Swipe or scroll horizontally to compare every column.

Starting points based on the A40 results with default settings. Repeat the test with the intended workload before deciding.
PriorityStart withReason from these tests
Smooth chat streamingSGLangLowest p99 inter-token latency at every load, with warm and cold prompts
First token under heavy loadTest vLLM and SGLang with your own trafficThe warm-cache A40 run favoured vLLM; cold runs on two other cards put all three within about 7%
Maximum full-load outputTensorRT-LLM, by a small margin2.8% more than vLLM at concurrency 64 with a warm cache, a practical tie with more operational overhead
Simplest common baselinevLLMpip install and no recorded warm-up stall

These are defaults. Each engine exposes the settings behind its behaviour, such as:

  • vLLM's chunked-prefill token budget;
  • SGLang's mixed-chunk option;
  • TensorRT-LLM's max_num_tokens.

Tuning could narrow or reverse these differences, and testing that is planned.

Evidence boundary

These results come from a handful of rented cards. The points below set out how far each finding reaches.

  • Engine and card changed together. Each engine ran on a separate physical A40. The SGLang Pod ran in a different region (EU-SE-1) from the other two (CA-MTL-1).
  • Small gaps are a tie. Throughput differences of 1% to 3% are a practical tie in these runs. The near-sevenfold gap in tail latency prompted a follow-up on one physical A40.
  • Warm and cold come from different runs. The original field-test results reflect a warm prefix cache. The cold-prompt results come from later runs on a separate A40 and an RTX 6000 Ada. At low load, the later A40 delivered about 20% more output tokens per second than the original cards.
  • Scheduler causes are inferred. The tests did not trace individual scheduler steps. The streaming explanations are the most likely causes rather than measured ones.
  • Costs are derived. They come from measured throughput and the hourly rate, and were not measured directly.
  • The workload is narrow. The results cover one model, one GPU generation, default engine settings and synthetic random prompts with fixed lengths. The load generator shared each Pod's CPU.
  • FP8 is outside this test. The A40 has no FP8 support. Newer GPUs, and TensorRT-LLM in particular, are often chosen for FP8 paths, which need their own test.
  • The API figure is a list price. The API comparison uses a list price on one date, without a measured API run.

What comes next

  • Same engines, a newer card: the RTX 6000 Ada, the same 48 GB on a newer chip with FP8 support. The RTX 6000 Ada vs A40 comparison asks whether the higher hourly rate pays for itself.
  • ECC on and off on one card: confirming whether memory protection explains the 20% gap between two A40s.
  • Tuned settings: whether the latency trade-offs move when each engine's scheduling settings are changed.
  • Traffic variants: longer prompts, longer outputs and shared prefixes.
Serving engines tested against GPUs. Published cells link to their field tests.
Serving engineNVIDIA A40 48 GBNVIDIA RTX 6000 Ada 48 GB
vLLMField test 001Field test 004
SGLangField test 002Field test 005
TensorRT-LLMField test 003Field test 006
See why the programme exists and what stays fixed

Frequently asked questions

Which is faster: vLLM, SGLang or TensorRT-LLM?

On one NVIDIA A40 serving Qwen2.5-7B with default settings, none was clearly faster. Output throughput stayed within 3% across all three engines at every load level. Cold runs at full load put them within 3% on a later A40 and 1.3% on an RTX 6000 Ada. Treat the differences as a tie.

Does the serving engine change the cost per token?

Barely, in this test. At concurrency 64 with a warm prefix cache, derived GPU cost was nearly identical. It ranged from $0.112 to $0.115 per million output tokens. Keeping the GPU busy mattered far more. Moving from one request at a time to 64 cut the cost about 40 times in these warm-cache runs. With new prompts on a later A40, it cut cost about 34 times.

Which engine streams most smoothly?

SGLang. At concurrency 64, its p99 inter-token latency was 44 milliseconds. TensorRT-LLM's was 59 and vLLM's 293. The gap between vLLM and SGLang held with cold prompts. The most likely reason is that SGLang, by default, keeps prompt processing out of the batches that generate tokens.

Which engine starts responses fastest under load?

It depends on how often prompts repeat. In these warm-cache runs, vLLM had the shortest p99 time to first token at concurrency 32 and 64. Cold runs on two other cards put all three engines within about 7% of each other at full load. In those runs vLLM was not the fastest.

Is TensorRT-LLM worth the extra setup on an A40?

For throughput alone, the gain was small. It produced 2.8% more than vLLM at full load with a warm cache, a margin I treat as a tie. It needed a 16 GB image, twice the disk and a warm-up before its first request was served promptly. Its advantages may be larger on newer GPUs with FP8 support, which this test did not cover.

Did the prefix cache change the results?

Yes. The tests reused prompts with every engine's prefix cache on, so the published figures describe a warm cache. Take concurrency 64 on one later A40. There, new prompts cut throughput by 16% to 31%. On an RTX 6000 Ada they cut it by about a fifth, with much longer median waits for the first token. The engine tie and the streaming differences held on both cards.

Can these results be applied to another model or GPU?

Use them as a reference point and repeat the method for the intended model, GPU, prompt shape and settings. Model size, precision, memory bandwidth, KV-cache demand, traffic shape and engine settings can all change the result.

Download and inspect the evidence

Continue through the research