SGLang vs vLLM on an RTX 5090: speed, memory and context
On 22 August 2026 I ran the same 27B model on the same 32 GB RTX 5090, one user at a time. SGLang with a drafter generated text fastest, at 139.7 tok/s; vLLM held the longest window and gave the steadiest numbers.

Short answer
On one RTX 5090, serving the same 27B model at a 32K context to one user, SGLang with a drafter generated text fastest, at 139.7 tok/s. vLLM reached 100.8 tok/s with the model’s own draft head and 84.5 without speculation. vLLM read long prompts slightly faster, reached the longest window and gave the steadiest numbers. The right engine depends on the job: SGLang with a drafter for the fastest replies to one person, vLLM without speculation when the window or steady numbers matter more.
Check if a model fits →Mac guide →RTX 5090 guide →
What was matched, and what was not
Both engines served the same checkpoint: Qwen3.8-27B in ModelOpt NVFP4, prepared for the RTX 5090’s 32 GB. Every run used a 32,768-token context, an FP8 KV cache, one request at a time and the same local benchmark suite on a warm server, on 22 August 2026. Each profile had to return a real completion before its suite started, and to pass recall, tool-call, vision, reasoning and repeated-stability checks before its speed counted.
The acceleration could not be matched. SGLang ran separate drafter models; vLLM ran the draft head built into the model, known as multi-token prediction (MTP). So this compares each engine with the best acceleration I could run for this model on this card. That is the real choice on this hardware. If you compare engines yourself, name the acceleration each one ran.
| Dimension | SGLang | vLLM | Matched? |
|---|---|---|---|
| Model and weights | Qwen3.8-27B · NVFP4 | Qwen3.8-27B · NVFP4 | Yes |
| Context and KV cache | 32,768 · FP8 | 32,768 · FP8 | Yes |
| Requests at a time | 1 | 1 | Yes |
| Speculation | DFlash 2 or DSpark drafter | Native MTP, or none | No |
| Tool-call parser | qwen3_coder | qwen3_xml | No: each engine’s parser for this model |
Generation speed: SGLang leads with a drafter
| Profile | Acceleration | Generation probe | Mean accepted length |
|---|---|---|---|
| SGLang · DFlash 2 | External drafter | 139.7 tok/s | 2.95 |
| SGLang · DSpark v2 | Target-matched NVFP4 drafter | 110.2 tok/s | 2.05 |
| vLLM · native MTP | Model draft head | 100.8 tok/s | 2.29 |
| vLLM · baseline | None | 84.5 tok/s | none |
| Profile | Short-probe mean | Population SD | Successful probes |
|---|---|---|---|
| SGLang · DFlash 2 | 272.3 tok/s | 37.0 tok/s | 5/5 |
| SGLang · DSpark v2 | 165.1 tok/s | 20.2 tok/s | 5/5 |
| vLLM · native MTP | 114.6 tok/s | 11.7 tok/s | 5/5 |
| vLLM · baseline | 86.1 tok/s | 1.4 tok/s | 5/5 |
The published harness computes population standard deviation across the five short prompts. Their output shape differs from the sustained-generation probe; this is not repeatability uncertainty for an identical 1,024-token request.
Against the same control, vLLM without speculation, SGLang’s DFlash 2 profile generated 65% faster, DSpark 30% faster and vLLM’s MTP 19% faster. The lead tracks the drafter. DFlash 2 had 2.95 tokens accepted per step, against 2.29 for MTP. Most of SGLang’s advantage here is that it could run a strong external drafter for this model.
One later result stays outside the table. An isolated vLLM pass moved MTP from three draft tokens to four and lifted it from 112.8 to 120.5 tok/s, with unchanged outputs. It came from a different test, so I have not matched it against the numbers above, though it narrows the gap.
Time to first token: close and tunable
Time to first token is where the two engines sit closest. On a short chat message SGLang answered first. On a 10,553-token prompt the plain vLLM profile was quickest, and every profile passed the recall check.
| Profile | Short chat prompt | 10,553-token prompt |
|---|---|---|
| SGLang · DSpark v2 | 0.065 s | 0.925 s |
| SGLang · DFlash 2 | 0.115 s | 0.993 s |
| vLLM · baseline | 0.138 s | 0.862 s |
| vLLM · native MTP | 0.143 s | 0.953 s |
At 44,031 tokens the pattern held: vLLM’s long-context profile read the prompt in 5.40 s and SGLang’s DSpark profile in 6.28 s.
Prompt speed is also the most tunable number. A later pass on SGLang’s DSpark profile changed the prefill chunk from 1,024 to 2,048 tokens. That cut median time to first token from 0.722 to 0.645 s on 8K prompts and from 4.286 to 3.837 s on 35K prompts, about 9,100 tok/s of prefill. I did not re-run that pass against vLLM, so it only shows which way SGLang’s number can move.
Both engines can reuse a cached prompt prefix, and that mattered more than either engine’s raw prefill. On this card a warm, shared prefix of about 16K tokens cut time to first token from 2.891 s to 0.283 s, a 90% cut. Keep system prompts stable, because a timestamp at the top invalidates the cache.
Memory use and context length
The engines reserve memory differently, so “VRAM used” is partly a setting. vLLM takes a fixed share of the card up front, 92% for the MTP profile and 94% for the baseline, and fills it with KV cache. SGLang’s static share was 85–86%, and its DSpark profile ended the suite holding 26,494 MiB, about 4 GB less than vLLM’s baseline.
| Profile | VRAM after suite | Configured context |
|---|---|---|
| SGLang · DFlash 2 | 29,150 MiB | 32K |
| SGLang · DSpark v2 | 26,494 MiB | 32K · 64K · 112K |
| vLLM · native MTP | 30,293 MiB | 32K |
| vLLM · baseline and long | 30,503 MiB | 32K · 64K · 128K · 262K |
The context ceiling followed the drafters. With no second model to hold, vLLM’s long profile could reserve the biggest windows. It read an 88,203-token prompt in 16.3 s and a 178,014-token prompt in 53.4 s, and recalled all three planted facts each time. SGLang’s DSpark profile, with its small drafter, validated 112K and read 77,187 tokens in 14.8 s. The fastest profile, DFlash 2, stayed at 32K.
The usable context is set by the KV pool the loaded engine holds, which can be smaller than the context length passed at launch. One obvious-looking flag change on SGLang, a bigger prefill chunk, silently disabled the drafter’s CUDA graph, and decode fell from about 109 to 19 tok/s. The repair then shrank the 114,688-token pool to 89,528. Accept a flag change only after you have checked the startup log and the pool size and run a real decode test.
Stability and start-up
All four profiles completed 5 of 5 repeated runs and passed the same recall, tool-call, vision, reasoning and quality checks. What differed was the spread: ±1.4 tok/s for vLLM without speculation, ±11.7 with MTP, ±20.2 for SGLang with DSpark and ±37.0 with DFlash 2. Speculation makes speed depend on how predictable the text is, so a drafter’s headline number is the average of a wider range.
Switching profile also costs time. I measured each switch once that day, from the switch to a verified ready server. SGLang DFlash 2 took 33 s, the vLLM baseline 62 s, vLLM MTP 129 s and SGLang DSpark 136 s. Treat those as orders of magnitude, because a warm file cache flatters whichever profile loads later. If you swap engines on demand, budget up to a few minutes per switch.
What decided the result
- Drafters. SGLang ran an external drafter for this model (DFlash 2) and a target-matched NVFP4 one (DSpark). vLLM drafted with the model’s own MTP head, so there was no second model to load. More acceptance bought more speed; the second model cost memory and steadiness.
- Tool calls. This model writes its tool calls in an XML format, and each engine needs its own parser for it:
qwen3_coderon SGLang,qwen3_xmlon vLLM. With the wrong parser both engines still return fluent text while the tool calls fail to parse. Test a real tool call as well as a chat message. - KV precision. Both ran an FP8 KV cache, which was effectively free here. A 4-bit cache is a different bet; the KV cache precision note shows why.
RadixAttention vs PagedAttention: what my test did not measure
Most SGLang vs vLLM comparisons centre on two designs. PagedAttention, from vLLM, manages the KV cache in blocks, borrowing from virtual memory, so that memory is not wasted as requests grow and shrink. RadixAttention, from SGLang, reuses the KV cache across requests that share a prefix, tracked in a radix tree. That is why it comes up for multi-turn chat, agents and RAG pipelines.
My runs were one request at a time, so they say nothing about concurrent requests or how either engine behaves under load. vLLM has prefix caching as well, so the question for a shared-prefix workload is how much each engine reuses on your own traffic. Measure that before reading these single-user numbers across to a multi-user service.
Which one to pick
- Fastest replies for one person: SGLang with a strong drafter.
- A drafter and long agent context on 32 GB: SGLang with a small target-matched drafter (DSpark here, at 112K).
- Speculation without a second model to manage: vLLM with the model’s MTP head.
- The longest windows, the steadiest numbers and a clean control: vLLM without speculation.
- Long documents: either engine. A stable, cached prefix matters more than the engine.
That is why I keep both as named profiles, each for a named job. The model-specific launch flags and the tuning traps are in the RTX 5090 serving recipes.
Common questions
Is SGLang faster than vLLM?
For generating text in these profiles, SGLang with DFlash 2 recorded 139.7 tok/s against vLLM native MTP at 100.8, with the same configured 32K cap. The profiles used different speculation methods; a configured cap is not the prompt depth of the generation probe. For the tested long prompts, vLLM was slightly faster.
Which uses less GPU memory?
SGLang’s DSpark profile ended at 26,494 MiB, about 4 GB under vLLM’s baseline. Part of the difference is a setting: vLLM reserves a fixed share of the card up front.
Which handles longer context?
vLLM without speculation was configured up to 262K, with a 178,014-token prompt read in 53.4 seconds and full recall. The SGLang DSpark profile was configured up to 112K; its reported long-context prompt was 77,187 tokens. Neither configured cap alone establishes completion at that full depth with output space reserved.
Which is better for agents and tool calling?
Both passed the same tool-call checks, each with the right parser for this model. For longer agent sessions with a drafter, the tested SGLang DSpark profile used a configured 112K cap; vLLM supported the largest configured cap and reported actual prompt in this set. Choose using the tested prompt depth, output reserve and task checks.
Can I reproduce these numbers?
The launch scripts, the benchmark harness and the raw runs are on GitHub. They are one person’s measurements on one card, and some flags were tuned after these runs, so re-measure on yours.
Sources
- GitHub: the launch scripts, the benchmark harness and the raw runs ↗︎
- SGLang on RTX 5090: Qwen3.8-27B configs and vLLM benchmarks: the four serving recipes, the context ceilings and the two tuning traps
- SGLang ↗︎: the engine behind the DFlash 2 and DSpark profiles
- vLLM ↗︎: the engine behind the MTP and long-context profiles
Use this

← Previous: SGLang on RTX 5090: Qwen3.8-27B configs and vLLM benchmarks
Want this inside your team’s workflow? The Verified AI Operations Sprint tests one workflow in ten working days. See the sprint →