The symptom: two kinds of slow
Users describe slow LLM inference in two ways. Either nothing happens for several seconds and then text streams quickly, or the first token arrives fast and the rest trickles out. These have different causes and different fixes, so split them before changing anything.
NVIDIA’s benchmarking guide defines the terms. Time to first token (TTFT) runs from submitting a query to receiving the first non-empty token, and it includes queueing and network time. Inter-token latency (ITL) is the average time between consecutive tokens, with TTFT left out, so it reflects only decoding. Time per output token (TPOT) is the closely related per-request figure that vLLM’s benchmark reports. End-to-end latency is TTFT plus generation time.
A slow first token is a prefill or queueing problem. A slow stream is a decode problem. A slow everything at high load is usually a capacity or batching problem.
References: NVIDIA NIM LLM benchmarking: metrics · vLLM serving benchmark options
Prefill vs decode: why the two phases slow down differently
Prefill processes the whole prompt at once. NVIDIA describes it as a highly parallel matrix-matrix operation that keeps the GPU busy, and its benchmarking guide notes that longer prompts increase TTFT because attention uses the full input sequence while the KV cache is built.
Decode then generates one token at a time per sequence. NVIDIA calls it a memory-bound operation: each step reads the model weights and the KV cache from GPU memory to produce a single token. Decode speed therefore tracks memory bandwidth and the bytes read per step far more than raw compute.
The KV cache sits between the two. It grows linearly with batch size and sequence length, according to NVIDIA, so long contexts and many concurrent users can exhaust GPU memory even when the weights fit easily. LLM VRAM requirements shows how to size it.
| Phase | Bound by | Shows up as | Main levers |
|---|---|---|---|
| Prefill | Compute | High TTFT | Shorter prompts, prefix caching, larger prefill token budget |
| Decode | Memory bandwidth | High TPOT or ITL | Smaller weights, faster memory, CUDA graphs, speculative decoding |
| Queueing | Capacity | TTFT rising with load | Continuous batching, more replicas, KV cache space |
References: NVIDIA Technical Blog: Mastering LLM techniques, inference optimization · NVIDIA NIM LLM benchmarking: metrics
Causes of slow LLM inference, most common first
First, no batching: a script calls a model’s generate function one request at a time, so concurrent users queue behind each other. Continuous or in-flight batching, which NVIDIA describes as evicting finished sequences immediately and starting new ones, is the standard fix. Second, long prompts: retrieval context, chat history or system prompts that run to thousands of tokens push TTFT up on every request.
Third, KV cache pressure. vLLM logs a warning when a sequence is preempted because there is not enough KV cache space, and preempted requests are recomputed later, which hurts end-to-end latency. Fourth, the model is large for the GPU’s memory bandwidth, so every decode step is slow. Fifth, eager execution: vLLM’s --enforce-eager skips compilation and CUDA graph capture for faster startup at the cost of steady-state decode performance.
Sixth, parallelism overhead. vLLM warns that raising tensor parallelism may cause excessive synchronization overhead and that pipeline parallelism may add latency, so splitting a model that fits on one GPU can make it slower.
References: NVIDIA Technical Blog: Mastering LLM techniques, inference optimization · vLLM optimization and tuning
Diagnostic commands to measure TTFT and TPOT
Measure under realistic load before changing settings. vllm bench serve reports percentiles for ttft, tpot and itl by default for generative models, and e2el on request. Set --max-concurrency to your expected number of simultaneous users and --request-rate to the arrival rate; the default rate of inf sends every request at time zero, which measures a burst rather than steady traffic.
Run once with your real prompt lengths and once with short prompts. If TTFT falls sharply with short prompts, prefill is the cost. If TTFT is fine at concurrency 1 and climbs at 32, requests are queueing. If TPOT is high even at concurrency 1, decode itself is slow.
Meanwhile, grep the server log for the preemption warning, and run nvidia-smi dmon -s um to watch utilization and memory. Low utilization with high latency points at the serving loop or the client, not the GPU. The method in benchmark LLM inference covers test design in more depth.
References: vLLM serving benchmark options · vLLM optimization and tuning · NVIDIA System Management Interface
Symptom, check and fix table
Each row assumes you have TTFT and TPOT percentiles from a benchmark run at a stated concurrency. Change one setting per run.
| Symptom | Check | Fix |
|---|---|---|
| High TTFT even at concurrency 1 | Prompt length in tokens | Trim context; enable prefix caching for shared prefixes |
| TTFT climbs as users increase | Benchmark at rising --max-concurrency | Use a continuous-batching server; add replicas |
| Latency spikes, preemption warnings in log | grep the log for preempted | Raise gpu_memory_utilization or tensor_parallel_size; lower max_num_seqs |
| High TPOT at concurrency 1 | Model size vs GPU memory bandwidth | Quantize weights or use a GPU with faster memory |
| Decode slower than expected after a config change | Is --enforce-eager set? | Remove it to restore CUDA graphs |
| Prefills stall streaming for other users | ITL percentiles vs max_num_batched_tokens | Lower max_num_batched_tokens, e.g. 2048, for better ITL |
References: vLLM optimization and tuning · vLLM automatic prefix caching · NVIDIA Technical Blog: Mastering LLM techniques, inference optimization · NVIDIA NIM LLM benchmarking: metrics
Fixes for prefill, batching and the KV cache
Serve through an engine with continuous batching rather than a loop over requests; deploy vLLM on a cloud GPU walks through the setup. Then tune the prefill token budget. vLLM’s guide says smaller max_num_batched_tokens values such as 2048 achieve better ITL because fewer prefills slow down decodes, while higher values achieve better TTFT. For throughput it suggests values above 8192, especially for smaller models on large GPUs.
For repeated context, turn on automatic prefix caching with --enable-prefix-caching. vLLM’s docs list long-document queries and multi-round conversations as the workloads that benefit. Note the limit: it only shortens prefill and does nothing for decode.
For preemption, vLLM’s documented fixes are to raise gpu_memory_utilization or tensor_parallel_size to give the KV cache more memory, or to lower max_num_seqs or max_num_batched_tokens so fewer requests share it.
References: vLLM optimization and tuning · vLLM automatic prefix caching
Fixes for slow decode
Because decode is memory-bound, the most direct lever is reading fewer bytes per token. Quantization reduces the precision of weights and activations, so the same model occupies less memory; LLM quantization for inference compares the formats and their accuracy costs. The other lever is a GPU with more memory bandwidth, which H200 vs H100 covers for the largest models.
Keep CUDA graphs on. vLLM’s default optimization level uses them, and only --enforce-eager turns them off. Speculative decoding attacks the one-token-at-a-time limit directly: NVIDIA describes drafting several tokens ahead and verifying them together, which helps most when a single stream must be fast.
Avoid parallelism you do not need. If the model and its KV cache fit on one GPU, one replica per GPU usually beats one model split across several.
References: NVIDIA Technical Blog: Mastering LLM techniques, inference optimization · vLLM optimization and tuning
Prevention and what to ask a GPU provider
Write a latency target per phase, such as p95 TTFT and p95 TPOT at a stated concurrency, and rerun the benchmark after every model, engine or prompt change. GPU inference SLOs shows how to set those targets.
Ask a provider which exact GPU model and memory size you get, since memory bandwidth decides decode speed; whether multi-GPU nodes use NVLink or PCIe between cards; whether the GPU is shared or dedicated; and how close the region is to your users, because network time counts toward TTFT.
References: NVIDIA NIM LLM benchmarking: metrics
Checklist and next step
Measure TTFT and TPOT separately at real concurrency. Use a continuous-batching server. Trim prompts and enable prefix caching for shared context. Watch for preemption warnings and give the KV cache room. Keep CUDA graphs on. Quantize or pick a higher-bandwidth GPU if decode is slow at concurrency 1.
When you know which phase limits you, match the GPU to it. NeuraMesh rents inference GPUs by the hour: choose a GPU, plan, count, hours and region on rent GPUs, and you receive a confirmed quotation, typically within one business day, with nothing charged until you approve. The compute advisor can suggest a GPU for your model and traffic.
NeuraMesh prices for these GPUs
| GPU | Memory | Data center | Value |
|---|---|---|---|
| RTX 4090 | 24 GB | $0.46 | $0.40 |
| L40S | 48 GB | $1.26 | $0.54 |
| A100 | 80 GB | $1.56 | $0.98 |
| H100 | 80 GB | $2.88 | $2.00 |
Every order is confirmed in a quotation before you pay. See all GPU prices.
Questions readers ask
What causes slow LLM inference?
Usually one of four things: no batching, so requests queue; long prompts that inflate prefill; KV cache pressure that forces preemption; or a model whose weights are large for the GPU’s memory bandwidth, which slows every decode step. Measure TTFT and TPOT to tell them apart.
What is the difference between TTFT and TPOT?
TTFT is the wait from submitting a request to the first token, covering queueing and prefill. TPOT, and the closely related inter-token latency, is the time per generated token after that, covering decode.
Why is the first token slow but streaming fast?
Prefill or queueing is the cost. Longer prompts increase TTFT because attention processes the full input. Trim the prompt, enable prefix caching for repeated context, or raise the prefill token budget.
Does quantization make LLM inference faster?
It often speeds decode, because decode is memory-bound and quantized weights mean fewer bytes read per token. Gains depend on the format, kernels and GPU, so benchmark before and after and check accuracy on your task.
Will adding a second GPU fix slow inference?
Not always. vLLM warns that more tensor parallelism can add synchronization overhead. If the model fits on one GPU, a second replica usually improves throughput more than splitting the model.
Sources and editorial notes
- NVIDIA NIM LLM benchmarking: metrics
- vLLM serving benchmark options
- NVIDIA Technical Blog: Mastering LLM techniques, inference optimization
- vLLM optimization and tuning
- NVIDIA System Management Interface
- vLLM automatic prefix caching
Primary documentation reviewed November 24, 2026. Provider descriptions reflect published documentation. Recommendations are our analysis; worked figures are illustrative unless explicitly stated otherwise. No independent provider benchmark or uptime ranking is claimed.
Need this GPU? Rent it from NeuraMesh: choose a GPU and plan, get a confirmed quotation, and pay only when you approve. See pricing.


