10 · Keep useful work on the GPU

Deep systems understanding · Study map 47 of 85

Chunked prefill: stop one reader blocking every writer

Suggested preparation: Continuous batching: refill seats every iteration

Picture it

Imagine a crowded post office where someone walks in with a thousand packages, forcing the clerk to process them all while a line of people holding single letters waits in agony. Chunked prefill solves this by politely asking the heavy shipper to process their packages in batches of ten, allowing the clerk to rapidly stamp single letters in between. This keeps the line moving smoothly for everyone, even if it means the giant shipment takes a little longer to finish.

What to understand

  • Prefill/decode interference and token budgets
  • Chunk size, scheduling policy, fairness, and TTFT/ITL tradeoffs

Follow the references

  1. 1 · Paper

    Agrawal et al. · SARATHI ↗

    Follow the mixed-batch diagrams and the role of chunk size.

  2. 2 · Documentation

    vLLM · Optimization and tuning ↗

    Read chunked prefill guidance and measure the current scheduler’s behavior.

Make it concrete

Replay short chats plus long documents. Sweep the token budget and compare p95 TTFT, inter-token gaps, throughput, and starvation of long requests.

You understand it when…

If streams become smooth but long prompts wait longer, which target did you improve and which did you trade away?

This is a study map. Follow the reference for the full explanation; use the question to test your mental model. Browse the reference shelf.