Preble: Efficient Distributed Prompt Scheduling for LLM Serving

Vikranth Srivatsa, Zijian He, Reyna Abhyankar, Dongming Li, Yiying Zhang

As Large Language Models (LLMs) move from simple chat interfaces to complex agents and long-document analyzers, the nature of our "prompts" has changed. We are no longer just asking, "What is the capital of France?" Instead, we are feeding models entire textbooks, massive codebases, or complex tool-use instructions.

This shift has created a massive efficiency problem. While single-GPU systems have learned to cache these long, repetitive "prefixes" to save time, our massive, distributed serving clusters are still largely "prompt-cache-blind." A new paper from researchers at UC San Diego and GenseeAI introduces Preble, the first distributed LLM serving platform designed to solve this.

TL;DR

Preble is a distributed scheduling system that co-optimizes KV (Key-Value) cache reuse and load balancing across GPU clusters. By using a novel "Exploitation + Exploration" (E2) algorithm, it achieves up to a 14.5x improvement in average latency and a 10x improvement in tail (p99) latency compared to state-of-the-art systems like SGLang and vLLM.

What Problem Does This Paper Address?

In modern LLM applications (like RAG or AI agents), prompts are often significantly longer than the generated output—sometimes by a factor of over 2,000. These long prompts often share the same "prefix" (e.g., the same 10,000-token document queried by 50 different users).

Examples of modern LLM workloads showing highly repetitive prompt prefixes.

To avoid re-calculating the math for these tokens every time, systems use KV caching. However, in a distributed environment with many GPUs, we face a dilemma:

  1. The Silo Problem: If we send all requests sharing "Prefix A" to GPU 1 to reuse its cache, that GPU quickly becomes a bottleneck while others sit idle.
  2. The Waste Problem: If we spread those requests across all GPUs to balance the load, every GPU has to waste cycles re-computing "Prefix A" from scratch because they don't have it in their local memory.

Current systems generally choose one or the other, leading to either massive queues or redundant computation.

Methods: The Preble Architecture

Preble introduces a two-level scheduling architecture consisting of a Global Scheduler and Local (per-GPU) Schedulers.

Preble's two-level scheduling architecture featuring a Global Scheduler and Local Schedulers.

The E2 Algorithm (Exploitation + Exploration)

The core innovation is the E2 algorithm. When a request arrives, the global scheduler decides:

  • Exploitation: Send the request to a GPU that already has the longest matching prefix cached.
  • Exploration: If the cached GPUs are too busy, send the request to the "lightest" available GPU, even if it means re-computing the prefix.

Prompt-Aware Load Balancing

Unlike traditional schedulers that just look at the number of requests, Preble calculates a "load cost" based on three factors:

  1. Current Load: The estimated time to finish existing tasks.
  2. Eviction Cost: The "penalty" of deleting an existing popular cache to make room for the new request.
  3. New Request Cost: The actual time needed to run the new request, accounting for how much of its prefix is already cached on that specific GPU.

Key System Features

  • Autoscaling Prefixes: If a specific prefix (like a viral document) becomes too popular for one GPU to handle, Preble automatically replicates that cache across multiple GPUs.
  • Prefill-Decoding Balancing: Prefill (processing the prompt) is compute-heavy, while decoding (generating tokens) is memory-bound. Preble intelligently mixes these request types on the same GPU to keep the hardware fully utilized.

Datasets and Workloads

The researchers evaluated Preble using five distinct, real-world workloads that represent the "long-and-shared" prompt trend:

  • Toolbench: LLM tool-calling with complex instructions.
  • ALFWorld: Embodied agents in virtual environments.
  • APPS: Software program generation.
  • NExT-QA: Video Question Answering (where the "video" is a massive tokenized prefix).
  • LooGLE: Long document QA.
  • Azure LLM Trace: A real-world production request trace from Microsoft Azure.

The system was tested on Mistral 7B and Llama-3 70B models across Nvidia A6000 and H100 GPU clusters.

Key Insights and Ideas

  • The Prefill Bottleneck: In modern tasks, the "prefill" phase (processing the prompt) significantly outweighs the "decoding" phase. Optimizing for prefix reuse is no longer optional; it is the primary lever for performance.
  • Sharing is Pervasive: In the studied workloads, 85% to 97% of tokens in a prompt were shared with other requests.
  • The "Exploration" Threshold: The authors found that it is often faster to "explore" (recompute on an idle GPU) if the amount of new computation is smaller than the amount of computation saved by the cache. This provides a mathematical basis for breaking "sticky" cache-based routing.

Key Results

  • Massive Speedups: Preble outperformed SGLang by 1.5x to 14.5x on average latency.
  • Tail Latency Control: For users at the "edge" of the performance curve (p99), Preble improved latency by 2x to 10x, meaning fewer "hangs" or slow responses for users.
  • Scalability: The global scheduler is highly efficient, capable of managing between 70 and 391 GPUs from a single instance without becoming a bottleneck itself.

Limitations and Future Work

  • Model Parallelism: While Preble supports standard tensor parallelism, the scheduling logic is primarily optimized for data-parallel replicas. Future iterations could more deeply integrate with pipeline parallelism.
  • Oracle Gap: The authors compared Preble to an "Oracle" (a theoretical perfect partitioner). While Preble is close, there is still a small performance gap, suggesting room for even more sophisticated prefix-placement strategies.
  • Static vs. Dynamic: The current system relies on some offline profiling for its load-cost regression functions; making these entirely dynamic and self-learning is a potential next step.

Summary updated

BibTeX
@inproceedings{srivatsa2025preble,
  author = {Vikranth Srivatsa and Zijian He and Reyna Abhyankar and Dongming Li and Yiying Zhang},
  title = {{Preble: Efficient Distributed Prompt Scheduling for LLM Serving}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=meKEKDhdnx},
}
Figure