esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
Let’s talk

I’ll build the agent for it.

What Is Prefill/Decode Disaggregation?

How splitting prefill and decode onto separate GPU pools works, why it can help, and what it costs, explained for your AI interview.

In short

Prefill/decode disaggregation runs the two stages of an AI request on separate pools of GPUs, so each pool can be sized and tuned for its own job. The price is copying the saved keys and values between pools, so it often isn't worth it for small or short-prompt workloads.

11 min readAdvancedOccasional · estimateFacts checked 27 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

A model answers in two stages: prefill reads the input, and decode writes the reply. Usually one pool of GPUs does both, so the stages can slow each other down. Disaggregation puts each stage on its own pool, sized and tuned for its job. The gain is steadier streams on a busy system. The price is copying the saved keys and values between pools, plus a router and a machine ratio to tune. For small or short-prompt workloads, one pool is often simpler.

What is prefill/decode disaggregation, in plain words?

A model answers a request in two stages. Prefill reads the input, and decode writes the reply (see the Prefill vs Decode Phases answer). Normally one group of GPUs does both. Disaggregation means splitting the two stages onto separate groups of GPUs, called pools, so each pool can be set up and tuned for its own job.

Think of a busy restaurant kitchen. When one cook takes a huge catering order and the table orders at the same time, every table waits. Many kitchens split the prep station from the grill line, so each can be staffed for its own work. For an AI support assistant, the catering order is a 50,000-token loan file pasted into a chat (made up), and the table orders are the short replies customers are waiting for.

Key words

Pool
A group of GPUs set up for one kind of work, with its own size and settings.
Disaggregation
Splitting one job into parts that run on separate pools.
Interference
One kind of work slowing another that shares the same chip.
KV transfer
Copying the saved keys and values from one pool to the other.
Goodput
The request rate a system keeps while meeting its latency targets.

Why do the two stages get in each other's way?

On one shared pool, a long reading pass can land in the middle of other users' token streams. Those users see a pause, even though their own requests are small. Researchers call this interference. The DistServe paper, listed for OSDI 2024 on arXiv, puts the problem this way:

  • “We find that this strategy not only leads to strong prefill-decoding interferences but also couples the resource allocation and parallelism plans for both phases.”

    DistServe paper (OSDI 2024)

  • “Without disaggregated prefilling, vLLM may insert some prefill jobs during the decoding of one request.”

    vLLM project docs

The vLLM docs add that this raises the slow end of token timing, which they call tail latency. Splitting the stages removes that clash, because each pool only does one kind of work.

What does splitting buy you?

Three gains, in plain words. First, each pool scales on its own: add prefill machines when prompts get longer, and decode machines when more people chat at once. Second, each pool can use its own layout (how the model is spread over the chips), so the first-word time and the time per word can be tuned apart. vLLM's docs list this as one of two main reasons to split.

Third, the target is goodput, the measure the DistServe paper is built around. It counts useful speed under latency limits. DistServe measures a system by the maximum rate it can serve while staying inside both the time to first token (TTFT) and the time per output token (TPOT) limits, on each GPU. Its paper says these two latencies matter, and that without a split a team has to favour one or over-provision to meet both.

The Splitwise paper, submitted to arXiv in November 2023, proposed the same split and argued that it lets a team provision resources for each phase independently. Moonshot AI's Mooncake, the serving platform for Kimi, a leading LLM service, separates the prefill and decoding clusters. Its paper calls it a KVCache-centric disaggregated architecture.

What would this look like for a real team?

Take a bank's support assistant running on one shared pool of 8 GPUs (made-up setup). Most chats are short. Then a compliance officer pastes a 50,000-token loan file (made up) into a chat. The pool spends a burst of compute reading it, and the short chats already streaming pause mid-sentence. The numbers below are made up to show the shape of the problem. None of them come from a benchmark.

  • Before

    One shared pool

    New chats wait about 2 seconds for the first word (made up). Streams pause for about 0.3 seconds each time a long file is read (made up).

  • After

    Split pools

    A prefill pool of 3 GPUs reads the file, and a decode pool of 5 GPUs keeps streams steady. First words come in about 1 second (made up), cache copy included, and the pauses go away. The 3 and 5 GPU split needs retuning when traffic shifts.

One pool or two

Shared pool

Prefill and decode mixed

long reads stall other tokens

Split pools

Prefill pool

reads prompts, sized for its own load

Decode pool

streams tokens, sized for its own load

Chats stutter

uneven pace, slow first word

Steady streams

each pool tuned on its own

  1. 1A long reading pass delays other users' tokens on the same pool.
  2. 2The saved keys and values are copied across to the decode pool.
  3. 3The decode pool streams tokens at its own steady pace.
Top: one pool does both stages, so a long reading pass can stall chats. Bottom: two pools, each sized for its own job, with the saved keys and values copied across.

The fix changes how the GPUs are sized, and the model stays the same. The reading pool can get more GPUs for long files, and the streaming pool stays sized for the number of open chats.

What does the split cost?

The split has a price. The Splitwise paper says that splitting a request across machines needs its state moved from the prompt machine to the token machine. Its authors built that move on the fast interconnects available in GPU clusters.

  • “It is not automatically better. For small models, short prompts, low concurrency, or clusters without a fast KV-transfer fabric, an aggregated deployment is simpler and often faster.”

    NVIDIA Dynamo docs

  • “TCP is slow enough that transfers of long prompts can exceed the engine's KV transfer timeout, and requests fail.”

    NVIDIA Dynamo docs

  • Copying the cache

    The saved keys and values move between pools on every request. When Dynamo scales across several machines, it needs an RDMA-capable network, which lets one machine write straight into another's memory, to keep that copy short. A slow link can make the copy the whole wait.

  • More knobs to tune

    You need a router that sends each request to the right pool, and a ratio of prefill to decode machines that fits your traffic. Get the ratio wrong and one pool sits idle while the other queues.

  • Short or small workloads

    With short prompts, low traffic or no fast link, one combined pool is simpler and often faster. vLLM's docs say its disaggregated prefill does not improve throughput, so there the split buys latency control.

  • Still young

    vLLM marks its disaggregated prefilling as experimental and subject to change.

Tip

Say the trade in one line: the split buys control over each stage's latency, and it pays with a cache copy and more machines to run.

How would you decide whether to split?

  1. 1

    Measure first

    Log the first-word time and the time per word under real traffic, and note the average prompt length.

  2. 2

    Set the two targets

    Write down the first-word limit and the per-word limit that your users actually need.

  3. 3

    Check the link

    Confirm the machines can move the saved cache quickly. If they cannot, the split loses the time it was meant to save.

  4. 4

    Compare under load

    Run one combined pool and one split setup on the same traffic, then compare goodput per GPU.

What does the interviewer want to hear?

A strong answer covers

  • Two stages on separate pools: prefill and decode.
  • Why: on a shared GPU, one stage slows the other's latency.
  • What you gain: each pool sized and tuned for its own job.
  • Goodput: requests per GPU that stay inside both latency limits.
  • The cost: the cache copy, a router, and the pool ratio.
  • When not to split: small models, short prompts, low traffic.

Common traps

  • Trap"Splitting always makes serving faster."

    BetterIt helps latency control and long-prompt traffic. It is not automatically better, and the cache copy adds cost.

  • Trap"The split means each request finishes sooner."

    BetterEach stage can run faster, but a request still waits for the cache copy and two queues. Judge the change by goodput under load.

  • Trap"Just add more GPUs to the prefill pool."

    BetterThat only helps if prefill is the bottleneck. Measure the first-word time and the queue first.

Can you spot the fix?

Spot the fix

Long loan files stall short chats on one shared pool. Which change most directly separates the two stages?

Quick check

What does the split cost that one combined pool does not?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q065Prefill vs decode phases?10 min
  2. Q055What is the KV cache, and why does it speed up generation?12 min
  3. Q314Static vs continuous batching?12 min
  4. Q334How do you cut cost on a cloud-hosted LLM workload?13 min
  5. Q336Hosted API vs self-hosted open weights for an enterprise?11 min
  6. Q326Prompt cache vs semantic cache vs KV cache?13 min

Last updated on 27 November 2026

Running a model in production and unsure how to split the load?

Venkat designs and builds AI products and agents, including the UI and the system behind them. Book a short call and say what you need, with your prompt lengths, traffic and latency targets.