Skip to content
IJK

Prefill Chunks Hold One Request: Why Long Prompts Block Others

By IJK ·

Why the post says a single prefill step saturates the GPU, what the default chunked-prefill strategy does and why running prefills in parallel is not a clean fix.

Why one prefill fills the GPU

Because of the parallelized processing of all prompt tokens, a single prefill step can already saturate GPU utilization. [1]

What the default strategy does

Consequently, in the default chunked-prefill strategy of vLLM, each prefill chunk contains only prompt tokens of a single request. [2]

The next request in line has to wait until the previous prefill phase has been finished before its own prefill phase can start. [3]

only thenLong prompt's prefill chunkcontains tokens of a single requestNext request in linewaits for the previous prefill to finishIts own prefill phase starts
What happens to the next request while a long prefill runs?

Why parallel prefill is not a clean fix

A straightforward solution would be to process prefill chunks of different requests in parallel. [4]

Any additional prefill executed in parallel would likely prolong the prefill duration a bit and slow down any concurrent decode-requests even further. [5]

This approach fails, however, when the next request in line has a long prompt too. [6]

Sources

  1. The TNG Technology Consulting source says: Because of the parallelized processing of all prompt tokens, a single prefill step can already saturate GPU utilization. How Long Prompts Block Other Requests - Optimizing LLM Performance
  2. The TNG Technology Consulting source says: Consequently, in the default chunked-prefill strategy of vLLM, each prefill chunk contains only prompt tokens of a single request. How Long Prompts Block Other Requests - Optimizing LLM Performance
  3. The TNG Technology Consulting source says: The next request in line has to wait until the previous prefill phase has been finished before its own prefill phase can start. How Long Prompts Block Other Requests - Optimizing LLM Performance
  4. The TNG Technology Consulting source says: A straightforward solution would be to process prefill chunks of different requests in parallel. How Long Prompts Block Other Requests - Optimizing LLM Performance
  5. The TNG Technology Consulting source says: Any additional prefill executed in parallel would likely prolong the prefill duration a bit and slow down any concurrent decode-requests even further. How Long Prompts Block Other Requests - Optimizing LLM Performance
  6. The TNG Technology Consulting source says: This approach fails, however, when the next request in line has a long prompt too. How Long Prompts Block Other Requests - Optimizing LLM Performance

Editorial (AI-assisted; automatically checked, not human-reviewed). Each statement is linked to its source; check the source before relying on a detail.

  • llm
  • inference
  • vllm
  • scheduling