The Inference Engine Choice Is a Batching Question

Key Takeaways
- •vLLM's PagedAttention eliminates memory fragmentation, boosting multi-tenant serving throughput by up to 4x.
- •SGLang's RadixAttention enables aggressive KV cache reuse across complex multi-step agentic prompts.
- •llama.cpp remains the undisputed champion for single-user local inference on CPU and Apple Silicon unified memory.
A Red Hat analysis published on 14 October 2026 compared vLLM and SGLang on identical hardware and found them within roughly one percent on two of three workloads. On code generation, SGLang led at 6.50 requests per second against vLLM's 5.34. On retrieval-shaped work the order reversed, 17.08 against 16.88. On long chat the two were effectively tied.
Those numbers come from Llama 3.1 8B on a single H100, out of the box, measured as requests per second at the highest arrival rate that still holds p95 time-to-first-token under one second.
The interesting result is not which engine won. It is how little separated them, and how much separates all of them from a tool that declines to batch.
What the engines actually schedule
Both vLLM and SGLang are, at bottom, schedulers and memory managers for the key-value cache, which stores the attention state for every token processed so far and grows with each conversation.
vLLM's origin was a memory problem. The original paper found that serving systems of the time wasted between 60 and 80 percent of cache memory by reserving large contiguous blocks up front. PagedAttention split the cache into fixed-size blocks that could live anywhere in memory and be allocated as a sequence grew, the same idea an operating system uses for virtual memory.
SGLang's origin was a different observation. Multi-turn chat, extraction workflows, and agents that branch and loop send the same system prompt and tool definitions on every call. RadixAttention stores computed cache in a tree keyed by token prefix, so a new request walks the tree, reuses what matches, and computes only the new part.
One optimised for capacity, the other for reuse. Both now ship continuous batching, prefix caching, chunked prefill, structured outputs, speculative decoding, quantisation and distributed execution, and both treat NVIDIA and AMD as first-class targets.
Where the gap actually appears
The scaling difference shows up under concurrency, and the cleanest evidence comes from a separate three-way comparison on consumer and workstation cards.
On an RTX 5090 with 32GB, running a mixture-of-experts model at 4-bit, the three engines produced these results: vLLM at 85.7 tokens per second for a single stream and 936 at 32 concurrent requests; llama.cpp at 77.8 and 369; Ollama at 76.8 and 74.
Single-stream, all three cluster in the seventies. At concurrency 32, vLLM is more than twelve times Ollama's throughput.
The reason is architectural rather than a tuning oversight. Ollama identified the model architecture, concluded parallel slots were unsupported, and launched its bundled server with a single slot regardless of the environment variable that is supposed to set concurrency. Throughput stayed at about 39 tokens per second at one request and at 32, while time to first token grew to 101.7 seconds. Importing the same GGUF file changed nothing.
A buyer comparing single-stream tokens per second is measuring the dimension where these engines are most alike.
Why the H100 comparison matters less than it looks
At datacenter scale the picture narrows. vLLM and SGLang sit close enough that the difference between them is smaller than the difference a workload change produces.
SGLang's prefix reuse is strongest exactly where the benchmark did not look. Both comparison sources used random text passages with almost no shared prefixes, which is the condition under which RadixAttention has nothing to reuse. A production agent sending the same twelve thousand token system prompt on every call exercises a different path entirely.
p95 time to first token favoured vLLM in all three rows of the H100 test, at 0.52 against 0.83 seconds on retrieval work, 0.82 against 0.87 on code, and 0.65 against 0.74 on long chat. That is a consistent advantage in the metric an interactive application notices first.
One hardware artefact is worth naming. vLLM on a 24GB card plateaued near 300 tokens per second from eight requests onward, because hybrid attention padded blocks to 1,568 tokens and left room for only a 17,294 token cache. That is a memory shape problem on one card, not a ceiling of the engine.
What the numbers do not settle
Neither benchmark isolates the case the choice usually turns on. A team deciding between vLLM and SGLang is choosing between capacity management and prefix reuse, and the published comparisons exercise neither under realistic prefix overlap.
Repository popularity points the wrong way. Ollama carries the most stars of the four projects and has the worst batching behaviour in every row measured. vLLM's own figure of roughly 96,670 stars against SGLang's 38,655 describes attention rather than serving fitness.
Single-stream figures describe a configuration nobody deploys at scale. Throughput at concurrency and p95 time to first token under that load are the two numbers a shared deployment experiences, and neither transfers from a vendor table without measuring the traffic it will actually serve.



