Why vLLM request preemption under load matters before you buy GPUs
A vLLM server that answers quickly at low concurrency but slows sharply at peak is often not short of GPUs. Preemption happens when the KV cache runs out of free blocks, so the engine pauses running requests, frees their cache and recomputes them later, which adds delay to requests that were already in flight. Memory, batch and context settings are usually the first fix, and they should be tried before a purchase order for more accelerators. Teams should work through this page when p95 or p99 end-to-end latency climbs as concurrency rises while the GPU utilization charts look fine, or when a capacity request is being prepared for a peak that the current hardware might handle with different settings.
The cost picture makes this worth checking early. vLLM is licensed under Apache-2.0 and has no paid edition, so the money goes to accelerator capacity, the surrounding infrastructure, the implementation work and the people who operate the server. Adding GPUs multiplies all of those costs and recurs every month, while adjusting memory use, concurrency limits or maximum context length is an engineering change with no license fee. Those settings do not remove the need for capacity, but they show whether the workload has a real hardware shortage or a configuration that reserves more cache than peak traffic needs. Ask whoever is quoting a GPU expansion to state which of these tuning steps were tested first.
Confirm the pattern before changing anything. The vLLM server exposes Prometheus-format metrics at /metrics, including KV cache use and latency histograms, and the vLLM production metrics documentation describes the series available in your release. Pair the KV cache readings with request latency and queue depth over a peak window. If cache use sits near its ceiling at the same moments latency spikes, preemption is the likely cause, and the next sections cover how to tune for it. Check the exact metric names against the version you run, since the vLLM release cadence is frequent and names can change between releases.
How a request moves from admission to preemption in vLLM
The diagram follows a request from the OpenAI-compatible server through the scheduler, which admits it only if the KV cache and batch limits allow. Admitted requests decode one token at a time, and when the KV cache runs out, the scheduler preempts a running request and resumes it later. Check gpu-memory-utilization, max-num-seqs and max-model-len at the points where they change the outcome, since each one sets how many requests fit before preemption starts.
Requests are admitted against batch and KV cache limits, and exhaustion triggers preemption.
How preemption adds end-to-end latency
Preemption adds latency because a request that loses its KV cache space must give up its place in the running batch and wait until memory frees up again. When vLLM cannot keep the key-value cache for every active request in GPU memory, the scheduler pauses some of them. The client sees no error. The response simply arrives later, and the time spent waiting for scheduling and for the work to be redone is added to the request's end-to-end time. Confirm how the vLLM release you run handles preempted requests, including what happens to their cached state and which preemption mode is in effect, because the cost of recovery depends on that behavior and it changes between releases.
This is why GPU utilization can look high while users wait longer. The GPU is busy because the remaining requests are still decoding, and the aggregate token rate may hold steady, yet individual requests spend time queued behind memory pressure. Long prompts and long outputs are hit hardest. A long prompt holds a large share of the cache from its first prefill step, and a long output keeps growing its cache with every generated token, so one such request can push others out of the batch and then wait a long time itself. Average throughput hides this, because a few requests that stall for a long time barely move the mean.
Measure time to first token and per-token timing at several load levels, not just aggregate throughput. Run the same prompt and output length mix at low, expected and peak concurrency, and look at the tail (high percentiles) of time to first token and inter-token latency. A sharp rise in the tail while throughput stays flat is the pattern to look for. Use the /metrics endpoint on the API server for KV cache usage and request state alongside your client-side timings, so you can match latency spikes to cache pressure. Pair this with a benchmarking guide check before you decide that more GPUs are needed.
Which memory, batch and context settings reduce preemption
This table compares the six settings that most directly change how much KV cache a vLLM server has for concurrent requests. Read each row as a lever: what it changes, how it reduces preemption, and what it costs you elsewhere. The main takeaway is that the settings trade memory headroom, concurrency and context length against one another, so change one at a time and re-measure preemption and latency after each change.
| Setting | What it changes | How it reduces preemption | Trade-off |
|---|---|---|---|
| gpu-memory-utilization | Fraction of GPU memory vLLM reserves for model weights, activations and the KV cache | Raising it gives the KV cache more blocks, so fewer running requests are evicted when generation grows | Less memory is left for other processes on the same GPU, which can cause out-of-memory failures under spikes |
| max-num-seqs | Maximum number of sequences the scheduler runs in one step | Lowering it caps how many requests compete for KV cache blocks at once, so each keeps its cache longer | Lower concurrency means more requests wait in the queue, which raises time to first token for some users |
| max-num-batched-tokens | Token budget per scheduler step, shared by prefill and decode work | A smaller budget limits how much new prompt processing can claim cache space in one step, easing bursts of long prompts | Smaller budgets can slow prompt processing and reduce throughput on lightly loaded servers |
| max-model-len | Maximum context length a single request may use | Lowering it stops a few very long requests from holding a large share of the cache and forcing others out | Requests longer than the new limit are rejected, so application behavior and error handling must change |
| KV cache data type | Numeric precision used to store cached keys and values, such as FP8 where the hardware and model support it | A smaller per-token footprint fits more tokens in the same cache, so fewer requests need to be preempted | Lower precision can change output quality, and support depends on the GPU generation and the model; confirm both before enabling |
| Tensor parallel size | How many GPUs share one model's weights and cache within a node | Splitting weights across more GPUs frees memory per GPU for cache, which increases total cache capacity per replica | Communication overhead rises with more GPUs, and a larger group reduces the number of independent replicas for a given GPU count |
How to confirm preemption and tune settings before adding GPUs
This sequence shows whether preemption or queueing drives latency under load, and it changes one setting at a time until the team knows whether memory and batch tuning is enough or whether more GPUs are the right call.
Capture a baseline with realistic lengths
The team that owns the serving workload builds a load profile from real traffic, with prompt and output lengths drawn from logs or a representative sample rather than fixed synthetic values. They run the current vLLM settings against that profile and record time to first token, inter-token latency, end-to-end latency and throughput at the concurrency they expect in production. The step is done when the team has a saved baseline report with the exact model, vLLM version, flags and hardware, so every later run can be compared against it.
Watch KV cache and request signals on metrics
During the same load run, the engineers scrape the Prometheus endpoint at /metrics and chart KV cache usage alongside running and waiting request counts and the latency histograms. Confirm the metric names against the vLLM version in use, since the metrics docs define what the server exposes. Set a working threshold for KV cache usage that the team agrees on before testing, and note how often the cache sits at or near that limit during peak load. The step is done when there is a time-series view of cache pressure next to queue depth for the whole run.
Separate preemption from queueing
Using the charts from the previous step, the engineers decide which problem dominates. Preemption shows up when KV cache is full while requests are being paused and rescheduled, which inflates latency for requests that were already running. Queueing shows up when many requests wait for a slot while cache has room, which points to concurrency limits or insufficient capacity. Confirm the signals in your vLLM version before drawing conclusions. The step is done when the team writes one sentence stating the dominant cause, supported by the charts.
Change one memory or batch setting
The engineer changes a single setting, such as gpu-memory-utilization, max-model-len, max-num-seqs or max-num-batched-tokens, and leaves everything else identical. Each change should have a stated hypothesis, for example that a higher memory fraction leaves more room for the KV cache. Lowering concurrency or maximum context may also reduce pressure at the cost of throughput, so the team should record the trade-off it accepts. The step is done when the change, its reason and the expected effect are written in the test log.
Rerun the same load profile
The team reruns the identical load profile from the baseline with only the one change applied, then compares preemption-related signals, KV cache behavior, queue depth and latency percentiles against the baseline. The check is that KV cache pressure and tail latency move in the expected direction without an unacceptable drop in throughput or an increase in errors. Repeat the cycle one setting at a time. The step is done when the team has a result table showing each change and its measured effect.
Decide when adding GPUs is the answer
The team reaches a stop point when the remaining settings cannot bring cache pressure under the agreed threshold at the required latency, or when the tuned settings reduce concurrency or context below what the business needs. At that point, the question moves to capacity: how many more accelerators, whether tensor parallelism is needed, and what the added cost is. Sizing work for that decision is covered in the GPU sizing guidance. The step is done when the team has a written recommendation, either to keep tuning or to add capacity, backed by the test results.
Which lever to test first for each traffic pattern
Short prompts with variable replies usually fill the KV cache through the number of conversations running at once, not through any single long request. Preemption tends to appear when a burst of users all start generating long answers together, so the first lever is usually the cap on concurrent sequences.
- Concurrent sequences (
max-num-seqs): Test a lower cap first. The symptom is a time-to-first-token spike during bursts, with queueing visible before the GPU looks saturated. - Memory headroom (
gpu-memory-utilization): Raise it only if the GPU has room for other processes. The symptom is KV cache usage sitting near its limit under steady load, with preemption events in logs or the/metricsendpoint. - Context ceiling (
max-model-len): Lower it if your chat clients never need the full window, since each admitted request then reserves less cache. - Side effect on peak throughput: A tighter cap can lower tokens per second at peak, and users may wait longer in the queue even when each reply streams quickly.
- Side effect on rejections: A lower context ceiling can reject the occasional long conversation, so check how the application reports that error.
Validate every value against a replay of your own chat logs, measuring prompt and output lengths, because averages hide the bursts that trigger preemption.
Retrieval and document workloads hold large prompts for each request, so a few requests can consume most of the KV cache. Preemption here often tracks prompt length: the server runs few sequences, yet the cache is still full, and time-to-first-token rises with document size.
- Context ceiling (
max-model-len): Set it to the longest prompt plus output your application truly sends. The symptom is high KV usage with only a handful of running requests. - Prefill scheduling (
max-num-batched-tokenswith chunked prefill): Test this to keep decodes moving while large prompts are processed. The symptom is long stalls in token streaming for requests already in progress. - KV cache precision (FP8 KV cache): Consider it when cache capacity is the limit and the model's quality holds at that precision. Confirm the accuracy impact on your own document questions before adopting it.
- Parallelism for more memory: Adding tensor parallelism spreads weights and cache across GPUs, which can recover headroom before you add a server. Confirm the interconnect and layout with the parallelism documentation.
- Prefix caching for repeated documents: It helps when the same documents recur, but review the cross-tenant timing implications before enabling it for shared deployments.
Replay representative documents from your retrieval pipeline and confirm the answer quality after each change, since memory savings that alter answers are not savings you can keep.
Batch jobs submit large volumes of requests and care about total throughput and job completion time more than per-request latency. Preemption in this pattern usually means the scheduler admitted more work than the cache can hold, so the server spends effort evicting and recomputing sequences instead of generating tokens.
- Admission depth (
max-num-seqs): Tune it to the concurrency the batch client actually sends. The symptom is throughput flattening while preemption counts keep growing as the job queue deepens. - Batch token budget (
max-num-batched-tokens): Adjust it to balance prefill and decode work within each step. The symptom is uneven progress, with some requests finishing late and a long tail at the end of the job. - Memory headroom (
gpu-memory-utilization): Test a modest increase only after the admission cap is set, since raising memory without a cap can simply move the thrashing. - Client concurrency: Match the number of parallel client workers to the server cap. Over-submitting causes queue growth that looks like latency problems but cannot be fixed on the server.
- Side effect on interactive users: If the same cluster serves chat, batch settings that favor throughput can raise latency for interactive traffic, so isolate the batch endpoint where possible.
Compare completed tokens per hour and preemption counts across a sweep of concurrency values on your own job data before settling on a configuration.
Security and operational effects of tuning under load
Changing memory and batch settings to reduce preemption also changes what the server exposes and what else shares the GPU. The cards below cover the endpoints that the API key does not protect, the reverse proxy allowlist that closes the gap, inter-node traffic, and the effect of tuning on other workloads on the same hardware.
Unprotected operational endpoints
The --api-key option protects the /v1, /v2, /inference and /cohere paths, but not /metrics, /health, /pause, /resume, /abort_requests or /invocations. Metrics expose request counts and KV cache use, which is exactly what you watch while tuning preemption, and pause and abort endpoints can change server state for every user. Before raising load to test new settings, confirm which of these paths answer unauthenticated requests on your build and network.
Reverse proxy endpoint allowlist
The vLLM security docs do not recommend relying on the API key alone. Place a reverse proxy in front of the server that forwards only the endpoints meant for users, such as the OpenAI-compatible inference paths, and blocks everything else from outside the host. Keep metrics scraping on a separate internal path that the proxy does not expose. Test the allowlist with requests to each blocked path after every configuration change.
Inter-node traffic on an isolated network
Communication between nodes in a multi-node deployment is insecure by default, with no authorization or encryption. Settings that increase batch size or move a model across nodes can increase this traffic. Place all cluster nodes on an isolated network segment that only the serving nodes can reach, and confirm that no inter-node port is reachable from user networks or the proxy's upstream range.
vLLM security docsShared GPU memory and other processes
Raising the share of GPU memory given to the KV cache leaves less headroom for the driver, other models, monitoring agents and any other process on the same device. A setting that removes preemption on an idle GPU can cause out-of-memory failures when a second service starts. Record which processes share each GPU, test the new value with those processes running, and set a rollback value in your change record.
Effects on latency for other tenants
Larger batches and more concurrent sequences raise throughput for the whole server but can lengthen the wait for each individual request. When several teams or products share one endpoint, a tuning change that helps one workload can degrade another. Define the traffic classes that share the server, measure latency for each class before and after the change, and keep interactive and batch traffic on separate endpoints where possible.
Metrics retention and access
The preemption counters and KV cache figures used to judge a change are only useful if they are collected over time and stored where the right people can read them. Decide who may view the metrics, how long Prometheus-format data is kept, and whether request-level logs contain prompts. Review these choices before tuning results are shared outside the platform team.
vLLM metrics docsWhat to confirm before changing settings in production
The right values for preemption controls depend on four things: the model, the GPU generation, the vLLM release and your traffic shape. A setting that clears preemption for short chat turns on one GPU may push long-context requests into constant eviction on another, so treat any value from a blog post, a recipe or this page as a starting hypothesis. Confirm each setting against your own workload before it reaches production. vLLM ships new minor releases about every two weeks, and scheduler behavior, default values and option names can change between them. The most recent releases in the supplied facts are v0.28.0 through v0.31.0, dated August 26 to October 5, 2026, which is a reminder that a configuration validated last month may not describe the engine you run today.
Before touching anything, pin the exact vLLM version in your image or package manifest and record a baseline on that version. The baseline should capture the number of preemption events, queue depth, time to first token, inter-token latency and end-to-end latency at the concurrency and prompt lengths your users actually send. Use the metrics exposed at /metrics for KV cache usage and request state, and replay representative traffic rather than synthetic bursts. Without a baseline on the pinned version, you cannot tell whether a change helped or whether a release upgrade moved the numbers. Ask your platform team who owns the baseline and where the results are stored, because you will need them again at the next upgrade.
Read the option names and defaults from the vLLM documentation for the release you have pinned, not from older notes. The vLLM online serving documentation and the vLLM production metrics page are the natural starting points, and the release notes on the vLLM GitHub releases page show which scheduler or memory changes landed in each version. Stage each change on a non-production replica, change one setting at a time, and rerun the baseline. Record the version, flags, hardware and results together so that a future release upgrade can be tested against the same evidence.
Limits to confirm in your environment
Preemption tuning depends on details that change with the GPU, the parallel layout, the vLLM release and the traffic shape. Confirm each limit below in your own environment before you treat a lower preemption count as proof that a setting works.
Model and quantization support
Confirm that your model, its quantization format and the KV cache dtype you plan to use are supported on the exact GPU generation you have. Support differs between CUDA, ROCm and other hardware, and some quantized checkpoints change the memory math you used to size the cache. Check the model's own entry in the vLLM recipes and the release notes for the version you run. If a combination is unsupported, the fallback path may allocate memory differently, so re-measure preemption after any change.
Installation docsBehavior under multi-GPU parallelism
Tensor parallelism splits the KV cache across GPUs, so the free cache per request depends on how the model is sharded and how much memory each GPU keeps for activations. Confirm how your chosen tensor and pipeline sizes change the cache blocks reported at startup, not just the total VRAM. Run the same load test at each layout you are considering, because a layout that fits in memory can still preempt more often under concurrency.
Parallelism docsExposed KV cache and scheduling signals
Preemption alerts only work if the release you run exports the counters you plan to watch. Check which KV cache usage, running and waiting request, and preemption metrics your version publishes at the metrics endpoint, and confirm the metric names before writing alert rules. Also confirm that histogram buckets cover the latencies you care about, since the default buckets may not separate slow requests well.
Metrics docsMulti-node networking latency
When one model spans nodes, activations move between them on every decode step, so network latency and bandwidth can add to request time even when no request is preempted. Measure inter-node latency on the network you will use, and confirm the backend (Ray or the built-in multiprocessing option) in your version. The security guidance also requires that inter-node traffic sit on an isolated network, which constrains where you can place those nodes.
Security docsRepresentative load test distributions
A load test with fixed prompt and output lengths can hide preemption that appears when long prompts arrive together with long generations. Build the test from a sample of your real request lengths, including the tail, and include the concurrency pattern you expect at peak. Confirm that your benchmark client reports the same token counts the server uses, or your memory estimate will drift from what the scheduler sees.
What buyers ask about reducing vLLM preemption
Does tuning vLLM to reduce preemption come with a license cost?
No license fee applies to the engine itself. vLLM is open source under Apache-2.0 according to its GitHub repository, and it has no paid edition. The cost of a tuning exercise comes from three places: the accelerator capacity you use for test runs, the surrounding infrastructure such as monitoring and test environments, and the people doing the work, whether your staff or a partner under a written scope. Ask any partner to break its quote into those components so you can see which parts are one-time work and which recur, such as ongoing load testing after each release.
How long does a preemption tuning exercise take?
Duration depends mainly on how much representative traffic you can reproduce, how many settings need testing, and how quickly test runs can be repeated. The first step is confirming that preemption is actually happening, which needs metrics history from a realistic period. Each tuning round then requires a controlled load run, a read of the results, and a change to memory, batch or context settings. Teams with a stable test environment and clear latency targets usually finish faster than teams that must first build both. Ask for the number of test rounds and the acceptance criteria in the written scope, not a single end date.
What does the work need from our team?
The work needs four things from your side. First, representative traffic: request lengths, output lengths, and concurrency patterns from production, or a sample that matches them. Second, metrics access: read access to the Prometheus-format metrics vLLM exposes at /metrics, including KV cache use and latency histograms. Third, a test environment with the same accelerator type and vLLM version as production, so results transfer. Fourth, a change window in which settings can be applied and rolled back. Confirm access approvals and the window early, because they often set the schedule more than the tuning itself.
Can our internal team reduce preemption on its own?
Yes, if the team has someone who understands vLLM memory behavior, can run controlled load tests, and reads latency histograms and KV cache metrics with care. Many teams manage the first pass internally and bring in outside help when results conflict, when load tests are hard to reproduce, or when the team lacks time. The main risk is changing several settings at once and misreading the cause. A written plan that changes one setting per round, records the metrics for each round, and sets a rollback step keeps internal work reliable. Your team carries the ongoing ownership either way.
When is adding GPUs the right answer instead of tuning?
Add GPUs when tuning has been completed against representative traffic and preemption still occurs at the concurrency your product requires. Tuning comes first because the KV cache memory, batch limits and context length settings often free capacity at no hardware cost. Hardware is the right answer when the model weights and the required KV cache for your target context and concurrency cannot fit with acceptable headroom, or when demand grows beyond what one configuration can serve. Ask whoever sizes the work to show the memory calculation for both options before you buy capacity.
What does a tuning engagement cover, and what does it not cover?
A tuning engagement covers diagnosing preemption from metrics, setting a test plan, adjusting memory, batch and context settings, measuring the effect on end-to-end latency, and documenting the final configuration with its results. It does not cover hardware procurement, model selection or changes to application code. Model quality after a configuration change is a separate check that your product owners should confirm. DeployOpen implements this work under a fixed written scope, so the deliverables, the test rounds and the acceptance criteria are agreed before work starts.
What should we check before accepting a tuned configuration?
Check that preemption events fall in the production-like load tests, that end-to-end latency at your target concurrency meets the agreed criteria, and that the configuration has been tested on the vLLM version you run. Confirm that headroom remains for other processes on the accelerator, because a configuration that works only at the edge of memory will fail under a traffic spike. Also confirm the rollback steps, the metrics you will watch after go-live, and who owns the next review when vLLM releases a new minor version, which happens about every two weeks according to its GitHub releases.
How DeployOpen scopes and delivers preemption tuning
DeployOpen starts from your load profile and the KV cache behavior you observe, then changes memory, batch and context settings in your own infrastructure and measures each change. The work is fixed-scope, with scope, deliverables and timelines agreed in writing before any tuning begins.
How we scope
- Review the current vLLM version, serving flags, GPU model and memory headroom on your servers.
- Agree which latency targets and concurrency levels the written scope must meet under peak load.
- Define the load test traffic, the metrics to capture and the retest conditions before work starts.
How we build
- Collect preemption counts, KV cache usage and latency histograms from the /metrics endpoint during baseline runs.
- Adjust memory utilization, batch limits and maximum context settings one change at a time, recording each result.
- Test the tuned configuration against the agreed load profile and compare it with the baseline before recommending GPU changes.
How we hand over
- Deliver the final configuration files, the benchmark results and a written record of each setting change.
- Document the preemption signals, dashboards and alert thresholds your operators should watch after go-live.
- Walk your platform and operations teams through the findings and the conditions that would call for more GPUs.
How we support
- Offer ongoing support, version upgrades and continuous load testing as a retainer after the fixed-scope work ends.
- Retest the configuration when you change the vLLM release, model, traffic mix or GPU hardware.
- Confirm your own cost components, including GPU capacity and operator time, with the written quote before starting.

