vLLM Fails to Start or Keeps Preempting Requests? KV Cache Budget, PagedAttention Blocks & gpu_memory_utilization Diagnosis Guide

2026-11-23 | GPU Repair | 22 minutes | HK GPU Fix Editorial Team

vLLM Fails to Start or Keeps Preempting Requests? KV Cache Budget, PagedAttention Blocks & gpu_memory_utilization Diagnosis Guide

Key takeaway

When vLLM will not start, or keeps preempting requests under load, the fault is usually a KV cache budget error, not a broken card. This guide explains how PagedAttention blocks, the startup reservation sequence, and the gpu_memory_utilization setting interact, then works through six decisive tests that separate a budget error from a driver, occupancy, concurrency, or CUDA graph problem.

What this pattern actually looks like

This guide only applies when one of three shapes is present. If none of them is present, the fault belongs to a different diagnosis path, and following the steps below will lead in the wrong direction.

The first shape is a startup failure. The command `vllm serve` stops before the server binds to its port, and the startup log contains one of three error messages. The first says that free memory on the device is less than the desired GPU memory utilization. The second says there is no available memory for the cache blocks and suggests increasing `gpu_memory_utilization` when initializing the engine. The third says that serving at least one request at the model's maximum sequence length needs more KV cache than the available KV cache memory, and it estimates a maximum model length that would fit. The exact wording of these messages comes from published guides written against vLLM 0.29.0, and the wording may differ in other versions. What matters is the shape of the message: a capacity statement, not a generic crash.

The second shape is preemption during operation. The server starts and answers requests, but under load it issues preemption warnings, evicts requests, and recomputes them. The log shows entries such as `preempted by PreemptionMode.RECOMPUTE`, the metric `vllm:kv_cache_usage_perc` sits close to its ceiling, and the metric `vllm:num_preemptions_total` keeps rising. Throughput falls sharply while this is happening, because work that was already done is thrown away and done again.

The third shape is a full memory reading at startup. The server starts, yet `nvidia-smi` shows memory close to full even with no traffic at all. On its own, this is not a fault. vLLM reserves its budget at startup, so a high reading with zero requests is expected behaviour. It must be kept separate from the first two shapes, because treating it as a fault leads to changing settings that were never wrong.

These three shapes have to be separated because the tests for each are different. A `torch.OutOfMemoryError: CUDA out of memory` from PyTorch training or inference belongs to the PyTorch caching allocator, not to the vLLM engine. A model that cannot fit on a card at all, or a question asked before buying a card, belongs to capacity planning. A framework reporting that no CUDA device was found belongs to device detection. A game reporting that it is out of video memory belongs to the game allocator. This guide is about the vLLM engine's own budget and block management, and nothing else.

Why vLLM reserves memory at startup instead of allocating on demand

The most important difference between vLLM and PyTorch is the timing of allocation. PyTorch allocates as it goes, taking memory when a tensor needs it. vLLM does not allocate memory on demand. At startup it loads the weights, runs a profiling forward pass to measure peak activation memory, and then claims all remaining memory up to `gpu_memory_utilization` as a paged KV cache.

The startup sequence runs in a fixed order, and each step takes its share before the next step begins. First, the model weights are loaded onto the GPU, taking a fixed amount that depends on the model size and the quantisation used. Second, a profiling forward pass runs with dummy input to measure peak activation memory. Third, from v0.21.0 onwards, the memory needed for CUDA graph capture is estimated. Fourth, whatever is left becomes the KV cache pool. The arithmetic is simple to state and easy to get wrong in practice: the utilisation fraction multiplied by total memory, minus weights, minus activations, minus graph capture, equals the available KV cache memory.

The setting `gpu_memory_utilization` is a fraction of total device memory, not a fraction of free memory. Published source code quoted in the guides reads the total memory of the device and multiplies it by the setting. On a 24 GB card, a setting of 0.92 asks for 22.08 GB of the total, regardless of how much is already occupied by another process. Two vLLM instances each set to 0.92 do not negotiate with each other; each one asks for its own share of the total, and the second one may find that the memory it asked for is already taken.

The default value of this setting differs by version, and no single value should be treated as permanently correct. Older writing gives 0.9, current documentation quoted against the configuration file gives 0.92, and still older writing gives 0.95. These are not three competing claims about one version; they are the defaults of different versions. A reader should check the documentation of the version actually installed, and should never assume that the default seen in one guide is the default in another version.

How PagedAttention turns the KV cache into blocks

PagedAttention, described by Kwon and colleagues in their SOSP 2023 paper, changes the shape of the KV cache. Instead of giving each sequence one long continuous tensor, the cache is cut into fixed-size blocks, typically 16 tokens per block. A block table maps each logical block of a sequence to a physical block that may sit anywhere in memory. The blocks of one sequence do not need to sit next to each other.

This design has three consequences that matter for diagnosis. First, any free block can serve any request, so external fragmentation is zero by design: there is no case where free memory exists but cannot be used because it is split into pieces too small to hold a continuous tensor. Second, each sequence wastes at most part of one block, the final block that is only partly filled. Third, allocation and release are constant-time operations, and a finished request releases its blocks immediately for other requests.

The paper measured the difference this makes. Naive serving left much of the KV memory holding no live token state, because continuous allocations left gaps that could not be reused. With PagedAttention, nearly all of the KV memory held live token state. The exact figures were measured on the paper's own workloads and should not be quoted as a promise for any other setup, but the direction is clear: the block design removes the fragmentation problem that dominates PyTorch allocator diagnosis.

That design decision determines the central claim of this guide. When vLLM runs out of memory, the cause is a budget error, not fragmentation. The PyTorch guide deals with memory that exists but is split into unusable pieces. The vLLM engine has no such pieces. When it fails, the budget was calculated wrong: the weights are too large, the activations are too large, the graph capture is too large, the concurrency is too high, or one of the three startup errors states plainly that the capacity is not enough.

Preemption is the safety valve at run time, not a fault in itself. When the KV pool fills up, the scheduler evicts all of the blocks of a request, because every block of a sequence is needed at every step, so evicting half a sequence would not help. The evicted request is then recomputed from the start under the V1 default, known as RECOMPUTE, or swapped back from CPU swap space under the older V0 behaviour, known as SWAP. The two modes are defaults of different versions, not a choice between a good mode and a bad mode. Occasional preemption is the design working as intended. Frequent preemption is the signal that the pool is too small.

The five suspect layers

A vLLM memory failure has five possible layers. Only the first is the main subject of this guide; the other four must be separated out before any conclusion is drawn.

Layer 1: KV cache budget — the startup capacity errors

All three startup error messages belong here. The budget is not enough, there are no blocks available, or a single request needs more KV cache than the whole pool. The evidence is the three decisive tests that read the log, test the direction of the utilisation setting, and test the sequence length.

Layer 2: Physical allocation — CUDA out of memory while loading weights or profiling

A `torch.OutOfMemoryError: CUDA out of memory` appears while loading weight files or during the profiling forward pass, before the engine ever reaches KV pool allocation. This layer is repaired in the opposite direction from the first layer: lowering the utilisation setting helps here, while raising it makes things worse. The separation is made by reading which error appeared first.

Layer 3: Other processes occupying memory — a shared GPU

Another inference program, another vLLM instance, or the display server is occupying memory on the same card. The utilisation setting is a per-instance limit, so two instances do not share politely. The separation is made by checking what is already running before starting vLLM.

Layer 4: Run-time concurrency — the pool saturates under load

The server starts, but preemption begins once the load rises. The startup budget was fine; the concurrent demand exceeds the pool. The separation is made with the run-time metrics and a concurrency reduction comparison.

Layer 5: CUDA graph capture — graph memory eats the budget before the pool is calculated

Graph capture memory grows with `max_num_seqs` and sits outside the KV cache pool. A large `max_num_seqs` setting can let graph capture consume the budget before the KV pool is even calculated. The separation is made by disabling CUDA graph capture and starting again.

Six decisive tests

Each of these tests answers a different question, and none of them overlaps with the tests for other out-of-memory shapes.

T1: Read the three startup error messages — which message, which failure

Do not stop at the words "out of memory". Read the startup log line by line. The three messages point to three different failures, as documented against vLLM 0.29.0. The first, about free memory being less than the desired utilisation, means there was not enough free memory before profiling even began: the problem is other processes occupying memory, or the utilisation setting being too high for the free space available. The second, about no available memory for the cache blocks, means that after profiling, the weights and activations consumed the budget and left the KV pool with no space. The third, about one request needing more KV cache than the whole pool, means a single request at the model's maximum sequence length cannot fit, and the message itself estimates a maximum model length that would fit.

This test is decisive because it reads the engine's own log, not a generic system error. No other guide in this series teaches how to read a vLLM startup log. The PyTorch guide reads a different kind of error message, with allocated and reserved figures from the PyTorch allocator, and that reading does not apply here.

T2: Utilisation direction comparison — raising or lowering the setting is itself a diagnosis

Only after T1 has sorted the failure should the direction be chosen. For the first kind of error, where there is not enough free memory, lower the utilisation setting, for example from 0.92 to 0.80, so that profiling does not ask the total for so much, or stop other processes occupying memory. For the second kind, where the KV pool has no space at all, and the third kind, where a single request is too large, raise the utilisation setting if free memory exists, or shorten the maximum model length. The key point is that the wrong direction makes the problem worse. Lowering the setting can fix a CUDA out-of-memory error while making a KV cache capacity error worse, and raising it can do the opposite. After one direction change, record whether the startup result changed from one error message to another. A change in the message is itself diagnostic information: it shows that the budget moved one step further through the startup sequence.

This test is new because no other guide in this series mentions `gpu_memory_utilization` at all. The PyTorch guide's expandable segments switch belongs to a different allocator and does not change the total budget, so it cannot be substituted here.

T3: Maximum model length reduction comparison — is one request too large for the pool

Shorten `--max-model-len`, for example from 131072 down to the maximum model length estimated in the error message, or smaller, and start again. If the server starts, the problem was that one request's KV requirement was larger than the pool, not that the weights were too large. If it still will not start even at a very short length, the problem sits in the weights or activations layer, and the path leads to capacity planning, tensor parallelism, or a check of the quantised checkpoint.

This test is new because the planning guide treats context length as arithmetic done before buying a card, not as a diagnostic comparison against a startup error. The PyTorch guide's comparison of shrinking the batch or lowering quantisation tests tensor allocation, not the relationship between one sequence length and the KV pool. The point that the error message itself estimates a usable maximum model length appears in no other guide in this series.

T4: Enforce-eager comparison — disable CUDA graph capture and see whether it was eating the budget

Add `--enforce-eager`, which disables CUDA graph capture, and start again. If the server starts, graph capture memory was the cause: it grows with `max_num_seqs` and sits outside the KV pool. If it still will not start, the problem is not graph capture, and the diagnosis returns to T1, T2, and T3. This test is a diagnosis, not a permanent fix. Disabling graph capture slows inference, so after confirming the cause, graph capture should be turned back on and a different part of the budget should be changed instead.

This test is new because no other guide in this series uses the enforce-eager flag as a test. CUDA graphs are mentioned once in the PyTorch guide, in passing, while discussing a different switch. They are not used there as a diagnostic comparison.

T5: Run-time preemption metric comparison — pool saturation or something else

Once the server is running, watch two metrics: `vllm:kv_cache_usage_perc`, which shows how much of the KV pool is in use, and `vllm:num_preemptions_total`, which counts preemptions so far. If the first sits close to its ceiling and the second keeps rising, the pool is saturated. Then run a reduction comparison: lower `--max-num-seqs`, then lower `--max-num-batched-tokens`, and watch whether preemption stops. If it stops, the concurrency layer is confirmed. If it does not stop, the problem is not the amount of concurrency, and the diagnosis returns to the startup budget in T1 and T2.

This test is new because no other guide in this series mentions preemption, the KV cache usage metric, or the maximum batched tokens setting. The PyTorch guide's peak-usage and cache-clearing test inspects allocator state, not scheduler metrics.

T6: Other-process occupancy comparison — look at what is already using memory before starting

Before starting vLLM, run `nvidia-smi` and look at which processes are already occupying memory: another inference program, another vLLM instance, or the display server. If something is there, stop it first, or set the utilisation low enough to fit the free memory that remains. Remember that the utilisation setting is a fraction of total memory, not of free memory: 0.92 on a 24 GB card asks for 22.08 GB, regardless of what is already on the card. If nothing else is running and the server still will not start, the problem is not the occupancy layer, and the diagnosis moves to T1 and T2.

This test differs from the PyTorch guide's fresh-process comparison, which tests accumulated state inside one PyTorch process. This test is a cross-process occupancy check before startup, because the budget fraction is calculated from the total, not from the free space.

Seven-step diagnosis flow

  1. Define the shape. Decide which of the three shapes is present: a startup failure with one of the three error messages, run-time preemption shown by the metrics, or a full memory reading at startup, which on its own is normal reservation behaviour.
  2. Read the error. Read the startup log line by line and sort the failure into one of the three messages in T1.
  3. Check other processes. Before starting vLLM, run `nvidia-smi` and see whether another process is occupying memory, as in T6.
  4. Test the direction. Follow the T1 sorting to decide whether to raise or lower `gpu_memory_utilization`, as in T2. The wrong direction makes things worse, so record whether the error message changed.
  5. Test the sequence length. Shorten `--max-model-len` and see whether a single request's KV requirement was larger than the pool, as in T3.
  6. Test graph capture. Add `--enforce-eager` to disable CUDA graph capture and start again, as in T4.
  7. Test at run time. Once the server is running, watch the preemption metrics and reduce `--max-num-seqs` and `--max-num-batched-tokens`, as in T5. If preemption continues at the smallest settings, return to T1 and T2 for the startup budget, or follow the capacity planning path for tensor parallelism or quantisation.

What this is not: boundary cases

SituationWhich path applies insteadWhy it is not this guide
PyTorch training or inference reports `torch.OutOfMemoryError`PyTorch caching allocator guideThe PyTorch allocator and its expandable segments switch, not the vLLM engine
The model cannot fit at all, or the question is asked before buying a cardLocal AI memory planning guidePlanning arithmetic, not startup error diagnosis
The framework reports that no CUDA device was foundCUDA device detection guideThe detection layer, not the budget layer
A game reports it is out of video memory while memory is not fullGame allocator guideA game or engine allocator, not the vLLM engine
Rendering or creative work triggers a driver reset or a long kernel timeoutDriver reset and long kernel guidesThe driver timeout layer, not the budget layer
The GPU cannot be found inside Docker at allDocker container GPU guideThe container runtime layer; the engine has no device yet
The weights are too large for one card however the budget is setPlanning guide with tensor parallelism or quantisationScaling and expansion, not budget diagnosis
Memory usage is high but the only symptom is slowness or late texturesVRAM exhaustion and performance guidesA performance problem, not an engine startup failure

Five common misconceptions

  1. "nvidia-smi shows the memory as full, so something is leaking or broken." Wrong. vLLM reserves its whole budget at startup, so a nearly full reading with zero traffic is expected. The startup log and the preemption metrics are the evidence to read, not the total in `nvidia-smi`.
  2. "Any out-of-memory error is fixed by lowering gpu_memory_utilization." Wrong. The direction depends on which error appeared. Lowering the setting helps a CUDA out-of-memory error during loading or profiling, and makes a KV cache capacity error worse by shrinking the pool further. Read the three messages in T1 first, then choose the direction.
  3. "A vLLM out-of-memory error is PyTorch fragmentation, so turning on expandable segments will fix it." Wrong. PagedAttention already removes external fragmentation by design: blocks are small, and any free block can serve any request. The vLLM problem is the budget, not fragmentation, and a PyTorch allocator switch does not transfer to the vLLM engine.
  4. "Preemption means the server is broken and must be stopped at once." Wrong. Preemption is the scheduler's safety valve: when the pool fills, a request is evicted and recomputed by design. Frequent preemption is the signal that the pool is too small, and that signal comes from the metrics, not from a single warning.
  5. "A bigger card will fix a vLLM out-of-memory error." Wrong. When the budget is wrong, a bigger card only makes the denominator of the fraction larger. If the weights, activations, graph capture, and concurrency do not change, the same error will return. Run T1, T2, and T5 first, and do not start by replacing hardware.

What to do next, and what not to do

If the six tests point to a KV cache budget error, the practical step is to record the exact startup error message, the utilisation setting, the maximum model length, the `max_num_seqs` setting, and the preemption metrics, and then change one setting at a time. Changing several settings at once destroys the diagnosis, because it becomes impossible to tell which change mattered. Keep the other settings fixed, change one, start the server, and record the new result before moving on.

Do not keep raising the utilisation setting blindly in the hope that a larger number will fix everything. On a shared card it can take memory that another process needs, and on a capacity error it is the wrong direction entirely. Do not disable CUDA graph capture permanently as a workaround for a budget error; it is a diagnostic step, and the long-term fix is to correct the budget and turn graph capture back on. Do not treat prefix caching or chunked prefill as a guaranteed fix either. Cached blocks occupy memory while saving recomputation, and the interaction between those features and the pool has not been verified here as an independent test, so it belongs after T5 as a follow-up direction, not as a first step.

The honest limits of this guide should be stated plainly. The vLLM engine was not run locally for this article, so the startup error wording, the default values, and the metric names come from the published guides and documentation cited in this guide, written between July and November 2026 against versions up to vLLM 0.29.0. Wording and defaults change between versions, so a reader should always trust the log and the documentation of the version actually installed. Multi-GPU tensor parallelism is mentioned only as a boundary: splitting a model across cards is scaling, not budget diagnosis, and it is not expanded here.

Repair pricing on this site follows the published three-tier fee structure of HK$400–2,800, with the final quote after inspection. A workshop inspection is what determines whether a fault sits in the card, the cooling, or the power delivery, and no fee can be fixed before that inspection.

HK GPU Fix is located at Dali Plaza, Room 1209, Shek Mun. The phone number is 2186 8010 and WhatsApp is 6558 6806. There is no Mong Kok shop and no on-site service; inspection and repair are carried out at the workshop.

FAQ

Q1: vLLM will not start and the log says there is no available memory for the cache blocks. Should I raise or lower gpu_memory_utilization?

First, check whether the error appeared during profiling or after it. The "no available memory for the cache blocks" message means the weights and activations consumed the budget and left the KV pool with no space. In that case, lowering the utilisation setting will shrink the pool further and make it worse. The useful directions are to raise the utilisation setting if free memory exists, to shorten `--max-model-len`, or to check whether another process is occupying memory. Do not change the direction until T1 has sorted the message.

Q2: The default gpu_memory_utilization seems to be different in every guide I read. Which value is correct?

All three values that appear in the guides are defaults of different versions: 0.9 in older writing, 0.92 in current documentation quoted against the configuration file, and 0.95 in still older writing. None of them should be treated as permanently correct. Check the documentation of the version actually installed, and treat the setting as a fraction of total device memory, not of free memory.

Q3: nvidia-smi shows the memory as nearly full the moment the server starts, even with no requests. Is the server leaking memory?

No. vLLM reserves its budget at startup: weights, then a profiling pass, then graph capture, then the whole remaining budget as the KV cache pool. A nearly full reading with zero traffic is expected behaviour. The evidence that matters is the startup log and the preemption metrics, not the total shown by `nvidia-smi`.

Q4: My server starts, but under load it keeps preempting requests. Is that a fault in the card?

Not on its own. Preemption is the scheduler's safety valve: when the KV pool fills, a request is evicted and recomputed. Watch `vllm:kv_cache_usage_perc` and `vllm:num_preemptions_total`. If the first sits close to its ceiling and the second keeps rising, the pool is saturated. Lower `--max-num-seqs` and `--max-num-batched-tokens` and see whether preemption stops. If it stops, the concurrency layer is confirmed.

Q5: Will turning on expandable segments in PyTorch fix a vLLM out-of-memory error?

No. PagedAttention already removes external fragmentation by design, because the KV cache is cut into small blocks and any free block can serve any request. A vLLM out-of-memory error is a budget error: the weights, activations, graph capture, or concurrency exceed what the pool can hold. A PyTorch allocator switch belongs to a different allocator and does not change the vLLM budget.

Q6: The server starts when I add --enforce-eager. Should I leave CUDA graph capture off?

Use it as a diagnosis, not as a permanent fix. Starting with `--enforce-eager` shows that graph capture memory was eating the budget, because graph capture grows with `max_num_seqs` and sits outside the KV pool. Disabling it slows inference, so after confirming the cause, turn graph capture back on and fix a different part of the budget instead, such as the model length or the concurrency settings.

Related articles

Related services

If you need Chip-level GPU repair, see these service pages: