Preble: Efficient Distributed Prompt Scheduling for LLM Serving

## Abstract

Abstract Prompts to large language models (LLMs) have evolved beyond simple user questions. For LLMs to solve complex problems, today’s practices are to include domain-specific instructions, illustration of tool usages, and/or long context such as textbook chapters in prompts. As such, many parts of prompts are repetitive across requests. Recent works propose to cache and reuse KV state of prompts. However, they are all confined to a single-GPU optimization, while production LLM serving systems are distributed by nature. This paper proposes Preble, the first distributed LLM serving platform that targets and optimizes for prompt sharing.
We designed a distributed scheduling system that co-optimizes KV state reuse and computation load-balancing with a new scheduling algorithm and a hierarchical scheduling mechanism. Our evaluation of Preble with real workloads and request arrival patterns on two open-source LLMs shows that Preble outperforms the SOTA serving systems by 1.5 × \times × to 14.5 × \times × on average latency and 2 × \times × to 10 × \times × on p99 latency.

## 1 Introduction

Recently, new capabilities and use cases of LLMs have created two common features not seen in traditional LLM usages. First, prompts to LLMs are significantly longer than generated sequences. For example, questions about a long document (Li et al., ) or a video clip Xiao et al. () are answered by LLMs with short answers. As another example, detailed instructions and illustrations for LLMs are vital in accomplishing complex tasks like solving advanced math problems Yao et al. (). The latest LLMs like OpenAI o1 have built-in reasoning capabilities; even though the end users’ prompts do not need to be long, these models internally add more context like chain-of-thought prompting  Wei et al. (), lengthening the total context length OpenAI (). As demonstrated by o1 and other model usage, oftentimes, the longer a prompt is, the better quality the model can generate. Long prompts with short generations imply that the prefill phase significantly outweighs the decoding phase. Thus, improving the prefill phase performance is crucial to the overall performance of LLM serving systems.

Second, prompts are partially shared across requests.
For example, a long document or video is often queried many times with different questions Li et al. (); different requests using the same tools share tool instructions in tool-augmented LLMs Hao et al. (); chain- or tree-structured prompting calls an LLM in steps, with each subsequent step reusing context from previous steps Yao et al. (); Zhang et al. (); Yao et al. (). Real-world production systems like Anthropic have also reported the wide existence of long and shared prompts Anthropic ().

Recent works Zheng et al. (); Gim et al. (); Moore & Li () propose to cache computed key-value (KV) state in GPU memory and reuse the cached KV when a new request sharing a prompt prefix arrives. These works aim to improve the serving performance of LLMs with long and shared prompts in a single GPU setting.
However, in-production LLM serving systems typically utilize a distributed set of GPUs to serve user requests. Current distributed LLM serving systems are not prompt-cache-aware; they attempt to distribute LLM computation load equally across GPUs to achieve high cluster-level GPU utilization. Yet, this distribution could result in requests with shared prefixes being sent to different GPUs, causing KV computation at all these GPUs that could otherwise be avoided if prefixes are cached and reused on the same GPU.
On the other hand, a naive solution that always sends requests with shared prefixes to the same GPU would result in imbalanced loads and low overall GPU utilization because the GPU that initially serves a request with a popular prefix will accumulate a huge load of new requests all trying to reuse the calculated prefix KV.

To properly design a distributed LLM serving system for long and shared prompts, we first perform a comprehensive study of five typical LLM workloads: LLM with tool calling Guo et al. (), LLM as embodied agents in virtual environments Huang et al. (), LLM for code generation Nijkamp et al. (), embedded video QA Xiao et al. (), and long document QA Li et al. ().
We find their prompts to be 37$\times$ to 2494$\times$ longer than generated sequences, and 85% to 97% tokens in a prompt are shared with other prompts. Additionally, a request often shares prompts with multiple other requests at different amounts (e.g., one prefix sharing being the initial system prompt, one sharing being the system prompt plus tool A’s demonstration, and one being the system prompt plus tool A and tool B’s demonstrations).
We also analyze the Azure LLM request trace Patel et al. () and found these end-user traces to have large prompt-to-output ratios as well. Additionally, this trace shows that requests arrive at varying speeds over time and across LLM usages, making designing a distributed LLM serving system challenging.

Based on our findings, we propose a distributed LLM request scheduling algorithm called E2 (standing for Exploitation + Exploration) that co-designs model computation load-balancing and prefix-cache sharing.
E2 allows requests to exploit (i.e., reuse) computed prompt prefixes on the same GPU but also gives chances for requests with shared prefixes to explore other GPUs. E2 chooses exploitation when the amount of recomputation saved is larger than that of new computation, which happens when the number of shared prefix tokens is larger than the remaining non-shared tokens. Otherwise, E2 chooses exploration.
For exploitation, we send the request to the GPU that caches the longest-matched prefix.

When E2 decides to explore GPUs, it chooses the GPU with the lightest “load”, using a prompt-aware load definition we propose.
This prompt-aware load includes three parts all calculated as GPU computation time.
The first part is a GPU’s computation load in a recent time window $H$, which is measured by the total prefill time and decode time incurred by all the requests in $H$. The second part is the cost of evicting existing KVs on the GPU to make memory space to run the new request.
The third part is the cost of running the new request on the GPU.
When calculating these three parts, we account for prompt sharing that have or would occur on the GPU by treating the reusable computation as zero cost.
E2 picks the GPU with the lowest sum of the three parts to explore, which balances loads while accounting for cached prompt behavior.

Centered around the E2 scheduling algorithm, we build Preble, a distributed LLM serving system that aims to provide high serving throughput and low request average and tail latency for long and shared prompts. Preble consists of a global, request-level scheduler and a per-GPU, iteration-level scheduler.
Apart from E2, Preble incorporates several novel designs to tackle practical LLM challenges.
First, with the basic E2 algorithm, a prefix is cached at a GPU after its initial assignment until its eviction. However, the amount of requests sharing it can change over time, which can cause load imbalance.
To mitigate this issue, Preble detects load changes and redirects requests from a heavily loaded GPU to a light GPU. If the load hitting a popular prefix increases beyond what a single GPU can handle, Preble automatically scales (autoscales) the prefix by replicating it on multiple GPUs.

Second, prefill and decoding phases have different computation needs, as discovered and tackled by a set of recent works Agrawal et al. (); Zhong et al. (); Patel et al. (); Agrawal et al. (). We propose a new way to solve this problem based on our insight that a prompt hitting a cached prefix can be treated as decoding-phase computation, while a missed prompt can be treated as prefill-phase computation because of the high prompt-to-decoding token length ratio. Thus, our global scheduler tries to mix the two types of requests on a GPU to balance prefill and decoding computation needs.

Finally, unlike existing works that either honor request fairness or maximize prefix matching, Preble aims to achieve high prefix reusing while ensuring fairness, which is important in multi-tenancy environments.
We achieve this by assigning priorities to waiting requests based on their prefix cache hit ratio and giving each priority their respective quota of requests to serve.

We implement Preble as a standalone layer on top of slightly modified vLLM Kwon et al. () and SGLang Zheng et al. (), two popular open-source LLM serving systems both supporting single-GPU prefix caching. We evaluate Preble using our studied five workloads and the Azure request arrival pattern with the Mistral 7B model Jiang et al. () and the Llama-3 70B model Meta () on a four-Nvidia-A6000 GPU cluster and an eight-Nvidia-H100 GPU server. Our results show that Preble outperforms SGLang by 1.5$\times$-14.5$\times$ and 2$\times$-10$\times$ on average and p99 average request latency and similarly when compared to vLLM.

Overall, this paper makes the following key contributions: (1) The first study of LLM workloads with long and shared prompts, resulting in four key insights. (2) E2, a new LLM request scheduling algorithm with the idea of exploitation and exploration integration. (3) Preble, the first distributed LLM serving system that targets long and shared prompts. (4) A comprehensive evaluation of Preble and SOTA LLM serving systems on two popular open-source LLMs, five real workloads, and two GPU clusters.
Preble is publicly available at [https://github.com/WukLab/preble](https://github.com/WukLab/preble).

Figure: Figure 1: Prompt Sharing Features of Five Workloads. Green boxes represent shared prefixes. Grey boxes are non-shared prompts. White boxes are output generation. Red boxes contain statistics in average values: “prompt-length:output-length; shared token percentage; number of requests sharing a sequence”.
Refer to caption: x1.png

## 2 Real-World Long and Shared Prompts

This section briefly presents our study results of five LLM use cases and an end-user LLM use trace: tool use Schick et al. (), embodied agent in a virtual environment Hao et al. (); Huang et al. (), software program generation Nijkamp et al. (), video QA Xiao et al. (), long document QA Li et al. (), and the Azure LLM usage trace Patel et al. () (which contains chat and code-generation usages). We pick the five workloads to study and evaluate, as they resemble long-and-shared-prompt use cases reported in production Anthropic ().
Figure 8 demonstrates the prompt usages and overall features of these workloads.
Appendix A presents our full study methodology and results.

Overall, our study shows that prompts are significantly longer than output lengths in the five workloads and the Azure trace, ranging from 4$\times$ (Azure chat) to 2494$\times$ (video QA). Moreover, prompt sharing ranges from 85% (i.e., 85% prefix tokens in a prompt are shared with at least one more request) to 97% across the five workloads, with embodied agents and program generation having the highest sharing amount. Additionally, a common sequence in a workload is shared by 8.6 to 126 requests on average, with different deviations across workloads. Finally, the Azure trace indicates high variations in total request loads manifested as different end-user request inter-arrival times that range from 2 microseconds to 217 seconds.

Our study results indicate that LLM serving systems for such workloads should focus on optimizing prefill computation, and a viable way is to cache and share prefixes. However, the variations in prompt-sharing features and request arrival patterns make it challenging to build an efficient distributed serving system.

## 3 Preble Design

We now present the E2 algorithm and the design of Preble, beginning with the overall system architecture of Preble, followed by its global scheduler and local scheduler designs.
Preble significantly improves serving speed and reduces request latency for workloads with long and shared prompts. For workloads without any shared prompts, its behavior and performance are the same as SOTA LLM serving systems like vLLM Kwon et al. ().

### 3.1 Overall System Architecture

Preble is a distributed GPU-based LLM serving system supporting both data parallelism and model parallelism. While its model parallelism support is standard (e.g., tensor parallelism), Preble’s scheduling of requests on data-parallel GPUs is designed specifically for long and shared prompts.

Figure: Figure 2: Preble Architecture.
Refer to caption: x2.png

We propose a two-level scheduling system where a global scheduler performs request-level scheduling decisions and orchestrates the overall load balancing across GPUs, while a per-model-instance local scheduler performs iteration-level scheduling for requests assigned to the GPU, as shown in Figure 2. Depending on the GPU cluster topology, the global scheduler may be deployed on a separate server for a multi-server GPU cluster or on the same server as a single-server-multi-GPU cluster. The local scheduler manages one model instance (multiple GPUs when using model parallelism, single GPU when not) and runs on the CPU of the same server as the GPUs.
Our current implementation of Preble scales to at least 70 to 391 GPUs. To offer larger, data-center-level scales, one can deploy several Preble clusters, each having one global scheduler.

This design offers several benefits: 1) by having all requests in a cluster go through the global scheduler, we have a centralized place to maintain a global view of cluster load and prompt caching information, both being essential for E2; 2) by performing coarse-grained, request-level scheduling, a single global scheduler can scale to hundreds of GPUs, avoiding the complexity of maintaining multiple distributed global schedulers for a cluster; and 3) by performing fine-grained, iteration-level scheduling at each GPU, the local scheduler can quickly adapt to GPU resource and request availability changes and make precise decisions.

### 3.2 E2 Global Scheduler

We now present our global scheduler design, which centers around the E2 distributed scheduling algorithm.

Global scheduler data structures.
The global scheduler maintains several data structures to assist its prompt-aware request scheduling.
The primary data structure is global prefix trees, implemented as radix trees Wikipedia (). Each tree has a distinct root storing the shared prefix of all prompts under the tree.
When inserting a new request to the tree, we match its tokens from the beginning (i.e., prefix matching) until no match exists, and we insert the remaining tokens as a new leaf node. If no match exists at all, we create a new tree with this request’s prompt as the root node. If an existing tree node only matches partially to the new request (i.e., the prefix of a node matches a sub-sequence of the new request), we split the node into the matched part and the remaining part.
For each tree node, we record three pieces of information: the number of tokens in the tree node, the set of GPUs caching the tree node KVs, and the per-GPU number of requests sharing the tree node in a history window $H$. When a tree node has no caching GPU and there is no request within the window $H$ in the whole system sharing it, we remove it from the tree.

Per-request scheduling policy.
To schedule a request, the global scheduler uses our proposed E2 scheduling algorithm, as illustrated in Algorithm 1.
It first matches the request’s prompt in the global prefix trees.
When the amount of recomputation saved (number of tokens in the matched prefix) is larger than the amount of new computation (number of tokens in the remaining prompt), we favor exploitation over exploration because the gain of saved GPU resources (computation for matched tokens) is higher than the load (computation for unique tokens) that can potentially be balanced in the GPU cluster.
For such requests, E2 exploits existing cache by assigning the request to the GPU that caches the tree node with the longest tokens in the matched prefix. If multiple such GPUs exist, E2 chooses the GPU with the lightest request load using the load calculation to be introduced next.

If the matched prefix is shorter than the remaining tokens, E2 explores the best GPU to run the request based on our proposed new prompt-aware “load cost” definition. Exploration gives E2 a chance to distribute load to different GPUs, which is the key to striking long-term cluster execution efficiency.
E2 unifies three types of costs when calculating the per-GPU load: the computation cost aggregated across all requests within a time window, the recomputation cost needed for evicting memory to run the new request, and the computation cost of the new request.
E2 calculates all three costs as GPU computation time and finds the GPU with the lowest sum.
Instead of profiling the actual computation time, we only maintain token counts at the global scheduler, which largely reduces the system overhead.
We leverage transformer-based LLMs’ properties that
the computation amount of prefill and decoding are proportional to the number of prompt tokens and generated tokens (Figures 10 and 10).
Below and in Algorithm 2, we detail the three calculations for scheduling a new request $R_{k}$.

The first cost is the overall GPU computation load $L_{i}$ for $GPU_{i}$. We capture a recent load history on $GPU_{i}$ with a time window $H$ with a default value of 3 minutes (we test different $H$ lengths and find the results insensitive to it).
We do not use $GPU_{i}$’s load at the exact request scheduling time for two reasons: 1) a GPU’s load can change between the time of scheduling $R_{k}$ to the time of running it, and 2) the placement of a prefix has a longer-term effect than a single load in time because of other requests’ future exploitation of it.
For each request $R_{r}$ in the history,
we estimate its prefill time $PT_{r}$ with a regression function using the number of tokens in $R_{r}$ that do not match any prefixes on $GPU_{i}$; we estimate its decoding time $DT_{r}$ with another regression function using the average request output length observed on $GPU_{i}$ in window $H$. We have the first category of load, $L_{i}=\sum_{r\in W}(PT_{r}+DT_{r})$, where $W$ is the set of requests in the window $H$. The regression functions used in this calculation are captured from offline profiling for each GPU type. Note that even though the number of output tokens is not known a priori, our workload study (Appendix A) shows that it is small and similar across a type of workload. Thus, we use the average output length in $H$
as the estimated decoding length for $DT_{r}$.

The second cost is the potential cost to free GPU memory so that the new request, $R_{k}$, can run. Given that GPUs run at full capacity with our and existing serving policies Agrawal et al. (), we expect this cost to always occur.
Intuitively, the more tokens in a sequence that are shared and by more requests, the more costly it is to evict the sequence.
Thus, to calculate the eviction cost, $M_{i}$, the global scheduler first uses the eviction algorithm to be discussed in Section 3.3 to find the tree nodes on $GPU_{i}$ that would be evicted to run $R_{k}$.
For each such tree node $j$, its eviction cost is the recomputation time of the evicted tokens multiplied by the hit rate of the node, $N_{j}$. Thus, we have $M_{i}=\sum_{j\in E}PT_{j}\times N_{j}$ where $E$ is the eviction node set, $PT_{j}$ is the prefill time for the length of tree node $j$, and $N_{j}$ is the the number of requests sharing tree node $j$ in history $H$ over the total number of requests on $GPU_{i}$ in $H$. Note that we do not include the decoding time, as a request’s decoding time is unaffected by prefix cache eviction, and decoding costs have already been counted in $L_{i}$.

The third cost is the actual cost, $P_{i}$, to run the new request $R_{k}$ on $GPU_{i}$, which is simply the prefill time of the missed tokens in request $R_{k}$. We do not count its decoding time, as it is the same across GPUs, and our goal is to compare the per-GPU load across GPUs.

The total cost of assigning the current request to $GPU_{i}$ is $L_{i}+M_{i}+P_{i}$ and we choose the GPU with the lowest total cost to assign the request to.

Post-assignment load adjustment.
With the above algorithm, after the global scheduler assigns a request to a GPU, its prefix lives there until its eviction. This greedy approach works well in cases where the load to a prefix is relatively stable but not otherwise.
We propose two ways of managing post-assignment load changes.
The first way shifts load between GPUs and is applicable when the load surge can be handled by a single GPU in the cluster.
The global scheduler maintains a per-GPU load as discussed above. If the most heavily loaded GPU’s load is more than $Th_{bal}$ times higher than the lightest GPU, it shifts load from the former to the latter until their difference is below $Th_{bal}$. $Th_{bal}$ is configurable and can be deducted from profiling GPU and LLM types.
To perform this load rebalancing, we direct future requests that are supposed to exploit the heavy GPU to the light GPU.

The second way is to auto-scale a prefix by replicating it and splitting its subtree by load when we detect that a certain prefix’s request load is still too high (average queueing time doubles over $H$) even after the above load rebalancing. We calculate the subtree’s load using Algorithm 2.

Prefill-decoding balancing.
From our study results in Appendix A and reported by others, LLM prefill has a larger compute-to-memory ratio than decoding, causing inefficient GPU resource utilization and performance degradation. While various recent works tackle the prefill-decoding imbalance problem by chunking prefills Agrawal et al. () and prefill-decoding disaggregation Zhong et al. (); Patel et al. (); Strati et al. (); Hu et al. (); Qin et al. (), we propose a new way of solving the problem leveraging prompt sharing features at a cluster level. Our insight is that a request with its entire prompt shared and cached would only perform the decoding phase. Thus, it can be treated as a decoding-phase computing unit. Meanwhile, a request with a long prompt not cached and a short output length can be treated as a prefill-phase computing unit. A partially cached prompt can be treated as being between the prefill- and decoding-phase units. Thus, we can balance prefill-decoding by combining requests with more or less prompt sharing instead of or in addition to existing balancing techniques.

Specifically, when a request is about to be explored, the global scheduler first considers the prefill and decoding balancing for each GPU. If a GPU is heavily loaded with decoding-phase computing units, the global scheduler directs the current request to it, as a request to be explored will incur recomputation for prompt and is considered a prefill-phase unit. We prioritize this policy over the load-cost comparison (Algorithm 2) because a GPU with heavy decoding has unused computation capacity that we can almost freely use. The global scheduler performs the load-cost comparison if all GPUs have relatively balanced decoding-prefill loads. Apart from this prefill-decoding balancing performed at the global scheduler, our local scheduler also performs traditional chunked prefill for each GPU (Section 3.3).

### 3.3 Local Scheduler

Local scheduler mechanism.
The local scheduler schedules the requests that the global scheduler assigns to its managed GPU(s).
Similar to existing LLM serving systems Yu et al. (); Kwon et al. (); Zheng et al. (); Aminabadi et al. (); Miao et al. (); Vaidya et al. (), we run one local scheduler per GPU and schedule requests at the iteration level. Each local scheduler maintains a request wait queue, a prefix (radix) tree, and the number of active requests sharing each prefix tree node.

When a new request arrives, the local scheduler matches it to the local prefix tree and updates the tree accordingly. It also inserts the request into the waiting queue.
After each model iteration, the local scheduler forms the next batch by selecting waiting requests using a priority-based algorithm to be discussed next. If a selected request has a long and non-shared prompt, we chunk the prompt similar to Sarathi Agrawal et al. (). If the GPU memory is not enough to run the batch, the local scheduler selects a tree node(s) or part of a tree node (if a part is enough) to evict based on the request accessing time (LRU) of tree nodes. The local scheduler then asynchronously informs the global scheduler about the eviction, and the latter processes it in the background.

Waiting queue request ordering.
Today’s LLM serving systems schedule requests in the waiting queue according to FCFS Kwon et al. () or prefix sharing Zheng et al. () (serve the request with the highest sharing amount the first).
The former ignores prompt sharing and results in more recomputation; the latter ignores fairness and could result in starvation Wu et al. ().
We propose a priority-based wait queue scheduling policy that considers both prefix sharing and fairness.
Specifically, we create $P$ (a configurable parameter) priority groups and assign a request to the priority group according to its cached token percentage. For example, if 63 out of 100 tokens in a request’s prompt are cached on the GPU and $P$ is 10, it will be assigned priority six.
When selecting requests to form the next batch, the scheduler proportionally selects requests from each priority group, with the higher priority group getting more requests selected than lower priority ones. For example, if 55 requests are to be selected to form a batch, the scheduler picks ten from priority group 10, nine from priority 9, etc.

## 4 Implementation and Evaluation Results

### 4.1 Implementation

We implemented Preble as a standalone layer to perform distributed LLM serving. As such, Preble can be added to any existing serving systems with no or minimal changes — we currently support vLLM Kwon et al. () and SGLang Zheng et al. () as two backends.

Global scheduler scalability.
In implementing the global scheduler, we use a few techniques to improve its scalability. Incoming requests are first tokenized by a parallel tokenization layer. Afterward, the global scheduler spawns asynchronous request handlers to schedule requests. Access to the global radix tree during request handling is lock-free, as most operations are read-only. The only exceptions are updating a GPU to be assigned to a tree node and the increment of request count hitting the tree node, both of which can be expressed as atomic instructions. Additionally, the global scheduler maintains a current load count for each GPU by updating it every time a new request is assigned to it or when it evicts a tree node. Thus, our realization of the E2 algorithm is performance-efficient. Finally, to ensure foreground request performance, the global scheduler runs non-request-scheduling tasks such as rebalancing and eviction bookkeeping in the background with separate threads.

### 4.2 Workloads and Environments

Workloads.
We evaluate our results on five LLM use cases: LLM generation with tool demonstration and calling Schick et al. (), LLM interacting with virtual environments as an embodied agent Hao et al. (); Huang et al. (), LLM for software program generation Nijkamp et al. (), answering questions about videos Xiao et al. (), and answer questions about long documents Li et al. (). Their properties are presented in Appendix A.

For each workload, we sample enough requests to fulfill the request-per-second (RPS) needs and GPU setup (e.g., a larger GPU or more GPUs can handle more). For experiments other than the ones using the Azure Inference Trace, we set the inter-arrival time using a Poisson distribution with a mean that corresponds to the RPS we test (X-axis in most figures). We then run the experiments until stable state is reached and lasts for a significant length.

LLMs and environments.
We test Preble and baselines using two popular open-source Large Language Models, the Mistral 7B model Jiang et al. () and the Llama-3 70B model Meta ().
We run our experiments in one of the two local testbed environments: a two-server cluster each containing two NVidia A600 GPUs and one eight NVidia-H100-GPU server.

Baseline.
Our baselines are serving systems that support single-GPU prefix sharing, including SGLang Zheng et al. () and vLLM (which recently added a beta feature for prefix sharing Moore & Li ()).
To run SGLang and vLLM in a distributed fashion, we set up a load balancer that sends requests in a round-robin fashion to individual SGLang/vLLM instances (i.e., non-prompt-aware data parallelism). As round- robin distributes requests evenly, these baselines capture a distributed serving system that balances request loads and then performs prefix sharing within each parallel instance.

Metrics.
We use three key metrics: request per second, which measures serving capacity; average end-to-end request latency (including scheduling time, queueing time, prefill, and decoding time); and p99 request latency.
Note that our metrics differ slightly from some existing LLM serving works Kwon et al. (); Yu et al. (), as we do not use TPOT (time per output token) or TTFT (time to first token) as key metrics. This is because our target LLM use has short output lengths, rendering TPOT not as meaningful and TTFT close to the request latency. We consider p99 latency since it is important to control the tail latency in LLM serving as with all other user-facing services DeCandia et al. (); Ongaro et al. ().

Figure: Figure 3: End-to-end Workload Performance The top and middle two rows run on two and four A6000 GPUs with the Mistral 7B model. The bottom two rows run on eight H100 GPUs set up as 4-GPU tensor parallelism plus data parallelism with the Llama-3 70B model.
Refer to caption: x3.png

### 4.3 End-to-End Workload Performance

We first present the overall performance of Preble and the baselines. Below, we focus on the comparison with SGLang as it is specifically designed for (single-GPU) prefix sharing while being up-to-date on major LLM serving techniques. We provide Preble’s comparison to vLLM and to different SGLang versions in the Appendix C.

Single workload results.
We now present the average and p99 latency against increasing requests arriving per second (RPS) of Preble and SGLang on the five workloads, two LLMs, and two GPU environments, as shown in Figure 3.
Overall, Preble significantly outperforms the data-parallel SGLang baseline for all settings, as can be seen from Preble’s lower average and p99 latency, especially under higher RPS (or the other way around, for the same latency target, Preble can serve higher RPS). Our improvements over SGLang range from 1.5$\times$ to 14.5$\times$ in terms of average latency and 2$\times$ to 10$\times$ in p99 latency.

Comparing across workloads, we see bigger improvements of Preble over SGLang on the Toolbench, embodied agent, video QA, and LooGLE workloads than the programming workloads.
The programming workload has the longest decoding length among all the workloads. As decoding time starts to dominate total request latency, and we do not improve decoding performance, the room for improvement for Preble is smaller.
Nonetheless, Preble still achieves 1.56$\times$ to 1.8$\times$ improvement in average latency and 3$\times$ to 4$\times$ in p99 latency over SGLang in the programming workload.

Comparing across the number of GPUs, Preble’s relative improvement over the baselines stays similar when going from two to four A6000 GPUs. Considering absolute values, we see Preble successfully maintain similar latency even as RPS doubles, showing its strong scalability.
When changing from A6000 to eight H100 and switching the Mistral 7B model to the Llama-3 70B model, we find relative improvements of Preble to increase.

Azure trace and mixed workloads.
Our experiments above use a Poisson request arrival distribution (which is the same as most existing LLM works’ experimental methodology Kwon et al. (); Li et al. ()).
To understand Preble’s performance under real-world request load, we run the tool use and video QA workloads using Azure’s LLM request arrival pattern (Appendix A.6) instead of Poisson distributions.
Here, we mix the two workloads to mimic Azure’s mixed chat and code traces.
As shown in Figure 5, Preble has significant improvements in average and p99 latencies and on average TTFT and TPOT.

Figure: Figure 4: Mixed Workload With Azure Trace Running Tool and Video mixed workloads with Azure trace arrival patterns on 4 A6000 GPUs.
Refer to caption: x4.png

### 4.4 Deep Dive

We now provide a detailed analysis of Preble, including an ablation study and global scheduler scalability test.
Because of H100 GPUs’ high cost and low availability, we run all experiments in this section with A6000 GPUs.

Ablation study.
To understand where the benefits of Preble come from, we evaluate Preble by incrementally adding features presented in Section 3. We chose the tool use workload with a Zipf-1.1 popularity distribution among the prompts in the dataset to represent real-life skewed tool popularity. Other workloads and distributions benefit from a different set of techniques.
We start with using the SGLang round-robin baseline. We first add the per-request E2 policy (Section 3.2), which results in an improvement on both average and p99 request latency because of E2’s dynamic load partitioning. We then add the post-assignment global rebalancing and autoscaling, which successfully balances out load even more, resulting in further improvement, especially with p99.
Further adding the prefill/decode-aware handling results in more improvement on both average and p99, since it considers the current batch composition and is able to better utilize the GPU resources.
Finally, we add the local-scheduler priority-based wait-queue scheduling (§3.3), which, as expected, improves p99 but not average latency, as its goal is fairness.

Global scheduler performance and scalability.
We measure the maximum throughput of Preble’s global scheduler by sending a large number of requests (e.g., 50,000) at once to eliminate the effect of request arrival patterns and saturate the scheduler. Since the global prefix tree search is the most time-consuming task at the global scheduler, we test the Toolbench and VideoQA workloads, which have the most complex and simplest prefix tree structures in our five workloads.
Preble’s global scheduler achieves a processing rate of 245 and 2931 requests per second for Toolbench and VideoQA. We also measure the network processing speed and find it not to be the bottleneck.
With the peak GPU processing rate (30-150 tokens per second decoding speed with Mistral 7B on A100) and our workloads’ output length (Table 1), one Preble global scheduler can sustain at least 70 to 391 concurrent A100 GPUs. If accounting for prefill time or running bigger models, our scheduler would sustain even more GPUs.

## 5 Related Works

LLMs’ usages are shifting to be more prompt-heavy. As a result, the problem of prefill and decoding having different compute-to-memory ratios is exacerbated.
Several recent works have targeted LLM usages with long prompts and proposed solutions to solve the imbalance problem Agrawal et al. (; ); Zhong et al. (); Patel et al. ().
The first approach, called chunked prefill, chunks a prompt and runs each chunk with other decoding requests in a batch in a single iteration to reduce or avoid waiting Agrawal et al. (; ). The second approach is to separate prefill and decoding to different GPUs to avoid prefill-decoding interference Patel et al. (); Zhong et al. (). These solutions target long prompts but do not consider prompt sharing. Preble consider prompt length and sharing, and we use a novel sharing-based approach on top of chunked prefill to solve the prefill-decoding imbalance problem.

A recent work, SGLang Zheng et al. (), proposes to share prefixes across requests using a prefix tree. More recently, vLLM also added the support for prompt prefix sharing Moore & Li (). Unlike Preble, SGLang and vLLM are both single-GPU solutions. To run them on a distributed GPU cluster, one would need to add a standard data or model parallelism layer and then run SGLang or vLLM on each GPU. As no parallelism or distributed serving systems today are prompt-aware, simply distributing requests or models and then performing prefix-sharing within a GPU ignores the cluster-level prefix-sharing opportunity. Apart from distributed support for long and shared prompts (Section 3.2), Preble also improves prefix-caching with fairness over SGLang and vLLM with a better waiting-request ordering policy (Section 3.3).
Another recent work, Prompt Cache Gim et al. (), proposes sharing arbitrary user-defined sub-sequences in a prompt by allowing mismatched positional encodings and incomplete attention computation. As such, non-prefix sharing is a lossy process that could result in lower-quality generation.
Moreover, like SGLang, Prompt Cache is also a single-GPU solution and shares SGLang’s limitations discussed above. Hydragen Juravsky et al. () is another recent work that proposes an efficient implementation of the attention operation for shared prefixes, which is orthogonal to Preble, as Preble can support any underlying attention kernels.

## 6 Conclusion

This paper identified the problem of distributed serving for long and sharing prompts. To solve this problem, we performed a study on five LLM workloads and one real LLM trace. We presented E2, a distributed LLM request scheduling algorithm targeting LLM usages with long and shared prompts. We built Preble, a distributed LLM serving system on top of the E2 algorithm and a hierarchical scheduling architecture. Our results show that Preble significantly improves LLM serving performance over SOTA serving systems while ensuring request fairness and controlling the tail latency.

## 7 Appendix

## Appendix A Study on LLM Prompts

Today’s LLM usage goes beyond simple chatting. As LLM usage becomes more commercialized, LLM prompts become more structured and complex, outshadowing the text an LLM generates.
This section presents our study results of five popular new LLM use cases: tool (or API, agent) use Schick et al. (), interacting with virtual environments as an embodied agent Hao et al. (); Huang et al. (),
software program generation Nijkamp et al. (),
answering questions about videos Xiao et al. (),
and answer questions about long documents Li et al. ().
Figure 8 demonstrates the prompt usages of these workloads.
We study each case with real public datasets and understand their prompt features from a systems perspective.
For datasets that do not provide outputs, we use Llama-3 7B model as the LLM to generate outputs.
For each dataset, we construct a prefix tree for all the requests in the dataset (i.e., assuming an infinite prefix cache).

Table 1 and Figure 6 summarize our study results, including prompt and decoding (output) length, amount of sharing in a prompt, key portion size in a prompt, and number of requests sharing a key portion.
We define the “key portion” of a request as the deepest node in a path that has more tokens than the sum of its predecessors.

To understand real-world LLM user request features, we study a recently released public cloud LLM trace. This section ends with our summary insights.

**Table 1: LLM Prompt Properties Each cell except for number of requests shows (mean, standard deviation). Length represented using number of tokens. “KeyPort.” stands for Key Portion.**
| Workload | Prompt Len | Output Len | Shared Prefix | KeyPort. | Req Share KeyPort. |
| --- | --- | --- | --- | --- | --- |
|  |  |  | in Prompt | in Prompt |  |
| Toolbench | (1835, 742) | (43, 16) | (85%, 13%) | (76%, 16%) | (39, 64) |
| Embodied Agent | (2285, 471) | (16, 13) | (97%, 14%) | (76%, 12%) | (48, 8) |
| Programming | (3871, 1656) | (190, 343) | (97%, 7.4%) | (78%, 13%) | (126, 2157) |
| Video QA | (9865, 5976) | (4, 1.5) | (88%, 32%) | (99%, 0.2%) | (8.6, 2) |
| LooGLE | (23474, 6105) | (16, 9.9) | (91%, 24%) | (94%, 15%) | (18, 8.6) |

### A.1 Tool Use

Today, LLMs are often augmented by various tools such as calculators and web searches. To equip a model with the ability to invoke a tool, it must be given the correct syntax for querying the tool, along with examples (or “demonstrations”) of tool use. We evaluate the Toolbench Guo et al. () dataset, which consists of more than 210k queries that call over 16k unique tools. Each query shares the same system prompt followed by tool-specific instructions. The final part of the query is the user’s specific question or task. These are all concatenated together to form the final prompt. We find that most of the sharing comes from queries that all share the same tool, and these instructions can be 43x longer than the output length. The Toolbench workload is also representative of other tasks that “prep” an LLM in a similar fashion. For example, instead of tool-calling, LLMs can have roles layered on top of the system prompt, which is popular in emerging systems that utilize the same LLM with multiple roles to create an ensemble Wu et al. (); Li et al. (; ).

Figure: Figure 6: CDF Plot of Key Metrics Showing CDF for all five workloads on prompt-to-decode ratio, shared prefix
Refer to caption: x6.png

### A.2 Embodied Agents

LLMs are increasingly found in agents that can interact with environments, such as a player in a role-playing game or controlling a robot. In this scenario, the LLM receives feedback from the environment, forms an action, and then “performs” the action. This is conducted in a loop until the model has achieved the goal. The workload we utilize is sourced from the ALFWorld Shridhar et al. () dataset and has 7.5k requests. Prompts first describe the environment and the task, followed by a demonstration of steps to solve the task. The model then solves its given task by looping over a planning step followed by an action step. After each action, the text-based environment returns an observation that the model incorporates into its next planning step. Every new invocation to the LLM in this loop is treated as a new request, resulting in each step sharing the context of previous steps. Interestingly, the number of steps is determined by LLM generation, creating an unpredictable sharing pattern. Because steps are chained together, prompts are still 157x longer than output tokens.

The embodied agent workload can represent a wide variety of other use cases, such as chain of thought Yao et al. (); Wei et al. (), multi-turn tool usage Wang et al. (); Qin et al. (), and chatbots Zheng et al. (). Any dependency between the model and the outside environment can be considered an agent receiving feedback.

### A.3 Program Generation

One of the popular uses of LLMs is to generate software programs Nijkamp et al. (). We study the APPS competitive programming dataset Hendrycks et al. (), a dataset of programming problems.
To generate better-quality programs, an approach taken by a recent paper Juravsky et al. () is to add a demonstration of several generic code examples before the user problem to instruct an LLM. This added demonstration is the same across all problems and becomes the system prompt. Following the system prompt is the programming problem description.
Afterward, this approach invokes the LLM several times in parallel to generate multiple candidate programs, out of which the best is chosen to return to the user.
As generated code is relatively long (compared to outputs of other workloads we study), the prompt-to-output ratio (20x) is relatively low.
Prompt sharing comes from two places: the system prompt of code demonstration is shared across all requests, and the programming problem is shared across all parallel generations.
Depending on how complex the problem is, its description could be longer or shorter than the system prompt; a problem description can also be partially the same as another problem description. Such complexity results in competitive programming having diverse key-portion properties.
Such example demonstration and parallel generation technique is common in recent prompt engineering, for example, with ReAct Yao et al. (), Tree-of-Thoughts Yao et al. (), and Self Consistency Wang et al. ().

### A.4 Video Question and Answer

The advent of video models like OpenAI Sora OpenAI () has created an explosion of interest in multi-modal models.
The use of LLMs, then, goes beyond natural language. A recent usage is to answer questions about videos by tokenizing a video segment and inputting it to an LLM Yu et al. (); Esser et al. ().
To study this, we analyze the NExT-QA benchmark Xiao et al. (), which consists of 8.5K questions for 1000 video segments. Prompts to the LLM consist of a tokenized video followed by a multiple-choice question. Because of the multiple-choice nature, the outputs of this dataset only have six tokens. Long tokens for representing videos plus short outputs result in this dataset having the highest prompt-to-decoding token ratio of all workloads we explored, with nearly 2500$\times$ more prompt tokens.
Apart from videos, images and audio can also be tokenized to have LLMs answer questions, and we expect them to have similar properties as video QA.

### A.5 Long Document Question and Answer

With newer models, the maximum context length has increased substantially Munkhdalai et al. (); Liu et al. (); Jacobs et al. (), with the latest development supporting 1M tokens Munkhdalai et al. (). Longer contexts enable new LLM applications such as asking questions about a long document or even a book. We evaluate this usage with the LooGLE dataset Li et al. (), a collection of 776 long documents and over 6.4k questions. LooGLE has a small system prompt of 13 tokens followed by a long document and then a question about the document. As a common practice, a user or multiple users often ask multiple questions to the same document, resulting in large amounts of shared tokens. Meanwhile, the answers are usually short (e.g., a true or false). These features result in high prompt-to-decode ratio and high sharing ratio in LooGLE.

Figure: Figure 7: Azure LLM Trace Analysis Results.
Refer to caption: x7.png

### A.6 LLM Usages in the Wild

To understand LLM usage in the wild, we analyze the recently released Azure LLM Inference Trace Patel et al. (). The trace includes two types of LLM usages: program generation and chat conversation. It provides request arrival time, prompt length, and decode length. As it does not provide actual request content, it is not feasible for us to evaluate prompt content or sharing. Figure 7 plot our analysis results in CDF. We find that the arrival rate is approximately 5 requests per second for chat conversation and 7 requests per second for programming. On average, chat requests arrive 118 ms apart while programming requests arrive 63 ms apart. The mean prompt-to-decode ratio for chat conversations is 4. Since we have no details about shared context from follow-up conversations, this number is expected to be much lower. For the longest 20% of all chat prompts, the mean prompt-to-decode ratio is 175, which is consistent with our observations on other workloads.
For programming, the mean prompt-to-decode ratio is 92 for all prompts. This falls within the range of all the workloads we evaluated.

### A.7 Summary Insights

Our analysis of the five real-world LLM workloads and a real user LLM request trace reveals several key findings.

Insight 1: Contrary to popular belief, prompts are significantly longer than output lengths because LLMs support longer context and new LLM usages keep emerging. We believe this trend will continue as LLMs are augmented with more capabilities.
Implication 1: Optimizing prefill computation can largely improve overall application performance, and imbalanced prefill and decoding computation features should be considered in LLM serving.

Insight 2: Prompt sharing, or reuse, is common, and the sharing amount is high. Sharing can come from different user requests needing the same tools or instructions to solve a task. It can come from a user asking multiple questions about the same document or video. Context sharing can also happen within the same user task that is solved with a chain or a tree of steps.
Implication 2: Reuse computation across shared prefixes can largely improve real workloads’ performance and should be efficiently supported by distributed LLM serving systems.

Insight 3: Most requests have a portion of the prompt sequence that gets a different degree of sharing and is longer than its prefix, reflected as a key portion in prefix trees. Key portions account for the majority of prompts and are shared by a significant amount of requests.
Implication 3: Identifying the key portion of prompts and optimizing the placement of requests according to their key portions is a viable way of reducing the complexity of scheduling while achieving good performance.

Insight 4: Real-world LLM usages have varying load intensity, and different usages (programming vs. conversation) have different loads. Real-world prompts are also much longer than decoding length, but different usages have different prompt-to-decode ratios. Still, the longest prompts are significantly longer.
Implication 4: An efficient LLM serving system should consider complex, mixed-usage scenarios and factor in both load and prompt sharing variations.

Figure: Figure 8: Workload Demonstration. Green boxes represent shared prefixes. Grey boxes are non-shared prompts. White boxes are output generation. Yellow star represents key portions that always happen at fixed parts; pink stars at non-fixed parts. Blue clouds represent the parts that would be used for distributing prefixes if knowing the oracle.
Refer to caption: x8.png

## Appendix B Prefill/Decoding Times

Figure: Figure 9: Prefill Time Decomposition
Refer to caption: x9.png

The prefill and decoding stages exhibit different computation behaviors, with the former being computation-bound and the latter being memory-bandwidth bounded. To understand their behaviors and to acquire prefill/decoding computation time functions to be used by E2, we profile the prefill and decoding stage performance with Mistral 7B on the A6000 GPU. Figure 10 plots the prefill time and its breaking downs when prompt length increases. As seen, longer prompts increase prefill time, suggesting that the more savings we can get from prefix sharing, the lower prefill time will be. Moreover, since the linear layer dominates the model forwarding at the prefill stage, the prefill time is overall linear to the prompt length.
Figure 10 shows the performance of a single request’s decoding performance with varying context lengths (the length of the prompt sequence plus the sequence generated thus far). We observe a similar linear relationship to context token length.
Overall, these profiling results suggest that attention computation is regular. Thus, we could use the token length with a profile regression function to estimate computation time.

Figure: Algorithm 1 E2 Global Scheduling Algorithm

Figure: Algorithm 2 GPU Load Cost Calculation

Figure: Algorithm 3 E2 Local Scheduling Algorithm

Figure: Figure 11: vLLM Backend Performance Evaluated on the Video QA workload using the Mistral 7B model on 2 GPUs.
Refer to caption: x11.png

## Appendix C Comparison with vLLM and Other SGLang Versions

To demonstrate Preble’s versatility with multiple LLM backends, we evaluate Preble on vLLM with the vanilla vLLM as the baseline.
vLLM recently added support for prefix caching, which we include in the baseline.
We use a slightly different version of the Mistral 7B model (v0.2) for this experiment, as vLLM only supports this version.
Figure 11 plots the results of running the VideoQA workload on 2 GPUs and the Mistral 7B v0.2 model for both Preble and vLLM.
Compared to SGLang as a backend, vLLM as a backend gives Preble less relative improvement for several reasons:
1) local-GPU prefix sharing is in beta version and not as performant as SGLang;
2) vLLM does not use the flash_infer kernel which makes prefix sharing more efficient;
and 3) vLLM does not support chunked prefill together with prefix caching. 4) vLLM has significant scheduling delay

To demonstrate Preble’s versatility across multiple SGLang versions, we evaluate the latest SGLang version (v0.3) Team () and the latest FlashInfer kernel (v1.6) Team () in addition to the v0.1.12 we used in Section 4.
SGLang made two major changes between these two versions: 1) the new FlashInfer kernel improved the performance of sharing 32K context length in the same batch, and 2) SGLang reduced its scheduling overhead and applied other engine optimizations.
Figure 12 plots the results of running LooGLE and Toolbench with SGLang v0.3 and Preble. Overall, Preble’s improvements over SGLang persist across SGLang versions.

Figure: Figure 12: Latest SGLang v0.3 and Flashinfer 0.1.6
Refer to caption: x12.png

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 3
presentation: 3
questions: In Section 3.1, it states, “Our current implementation of Preble scales to at least 70 to 391 GPUs.” Based on my understanding, Preble is designed as a single model serving system. Why, then, does it require such a large number of GPUs to serve a single model? I can serve a LLaMA-3-70B model using just four A100 80GB GPUs. 
How does Preble compare to vLLM?
soundness: 1
strengths: The scheduling algorithm seems interesting. The authors introduce a lot of background of LLM in the appendix.
summary: The paper introduces Preble, a distributed LLM serving system specifically designed to handle long-context prompt workloads. The authors propose a tree-based prefix-matching algorithm and an online workload-balancing algorithm that combines exploration and exploitation strategies. Preble demonstrates the ability to reduce P99 latency for the Mistral 7B and LLaMA-3-70B models on video QA workloads, using Azure’s LLM request arrival patterns, compared to SGLang and vLLM.
weaknesses: I think the major problem is that the authors mix the concept of high-level cluster scheduling with low-level GPU kernel design, which is very confusing. In Section 3.1, the overall design, the term “data parallel” is used inaccurately. Typically, data parallelism refers to the process of dividing data into chunks and distributing these chunks across blocks and threads in low-level kernel design, instead of splitting data to different servers at a high level.

The statement in the abstract, “production LLM serving systems are distributed by nature,” is misleading. Whether a production LLM requires distributed serving depends on the model size. For instance, in the evaluation section, it’s unclear why the Mistral 7B model is split across multiple servers, as it can easily fit and run inference on a single A100 GPU.

The authors claim to have implemented their scheduling system on top of vLLM, but there is no explanation of this implementation, nor does vLLM appear in any of the evaluation results. To my knowledge, vLLM supports distributed serving and leverages Ray for efficient workload balancing.

---

confidence: 4
contribution: 2
initial_rating: 6
presentation: 2
questions: See the weakness.
soundness: 3
strengths: The paper achieved performance improvements comparing to prompt caching mechanisms (vLLM and SG-lang).

The paper further considered fairness into scheduling process in the optimization in prompt cache.
summary: The paper presents Preble which optimize for prompt sharing in distributed LLM serving system. More specifically, the paper proposed some load-balancing mechanism that takes considerations into prompt sharing and fairness for large language model in multi-GPU setting, and designed global and local scheduler for coarse assignment and fine-grained scheduling and eviction policy. Experiments show the performance gain comparing to vLLM and SG-lang based baseline.
weaknesses: The major concern is that contribution and novelty of this paper is limited. 

Distributed prompt sharing optimization across GPUs: Optimize the inference among multiple GPUs (even in cluster level system) is previously studied by various work. As some of the previous work has been cited by the paper, mem-serve[1], inference without interference [2], mooncake[3] are all large scale systems serves beyond a single GPU. Those systems all considered shared prompts, and can be used with long context in production level. In those papers, global scheduling algorithms are already proposed to route the request with minimal re-computation. Yet, the method is only compared with vLLM and SG-Lang. The paper didn’t discuss the difference between those serving system, as well as considering them as baselines to discuss. 

The localized fine-grained local scheduler: The design of the local scheduler is mainly based on Radix-tree scheduling (SG-Lang), considering fairness added on.

The scenario of the prompt sharing: Previous literature SG-Lang[4], CacheBlend[5] and Prompt Cache[6] have all mentioned the cache reuse opportunity.

[1] MemServe: Context Caching for Disaggregated LLM Serving with Elastic Memory Pool  
[2] Inference without Interference: Disaggregate LLM Inference for Mixed Downstream Workloads
[3] Mooncake: A KVCache-centric Disaggregated Architecture for LLM Serving  
[4] SGLang: Efficient Execution of Structured Language Model Programs  
[5] CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusion  
[6] Prompt Cache: Modular Attention Reuse for Low-Latency Inference

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: - What are potential unobserved/unexpected bottlenecks when the systems scales to hundreds or even thousands of machines? Wiil they significantly limit the scalability of the system?

- Given that prompt-sharing can vary beyond exact prefixes, can Preble be extended to support non-prefix caching mechanisms?

- How does Preble’s fairness mechanism prioritize requests if there are multiple users with varying priorities?

- Is there any Trade-off between Cache Utilization and Load-Balancing in E2 Scheduling?
soundness: 3
strengths: - The authors propsed a first system to address efficient prompt-sharing in distributed LLM environments. 
- The proposed E2 scheduling algorithm seems to effectively balance prefix cache sharing and computation load across GPUs and the authors show significant performance gain compared to SGLang.
summary: The paper presents a distributed serving system designed to handle large language models (LLMs) with long and shared prompts efficiently. Preble aims to improve the reuse of computed key-value (KV) state across multiple GPUs, overcoming the limitations of current systems that primarily focus on single-GPU optimization. The authors introduce a new distributed scheduling algorithm called E2 (Exploitation + Exploration) to balance the reuse of shared prompt prefixes while managing GPU load effectively. Evaluations using real-world workloads demonstrated that Preble outperforms existing state-of-the-art systems by reducing average latency and p99 latency.
weaknesses: - Althought the paper claim strong scalability, it is only partially supported by experiments on two four-GPU machines.

---

confidence: 4
contribution: 3
initial_rating: 8
presentation: 3
questions: Please see questions in weaknesses.
soundness: 4
strengths: 1 - The paper is well-written and well-organized. I appreciate the intuitive diagrams and figures in the paper.

2 - Motivations and characterizations are clear and inspiring.

3 - The design and analysis are technically clear and sound.

4 - The proposed framework is implemented and evaluated against two popular LLM inference systems, vLLLM and SGLang.

5 - Extensive experiments are conducted, and real-world LLM inference applications are used in the evaluation, which is comprehensive.
summary: This paper introduces a distributed LLM inference framework, Preble, which is specifically designed for long and sharing prompts. Before diving into the solution, the paper first characterizes a wide range of LLM applications and production LLM inference traces that motivate the problems. By designing E2, a distributed LLM request scheduling algorithm, the paper aims to improve LLM usage with long and sharing prompts. Extensive experiments are performed against two popular LLM inference systems: SGLang and vLLM. By running real-world applications, workloads, and GPU testbeds, Preble outperforms existing baselines by significantly improving LLM serving performance.
weaknesses: 1 - E2 determines whether it's exploration or exploitation by measuring the computation for matched tokens and computation for unique tokens. This simple design is intuitive enough but remains fixed across different cases. It might be better to make this design dynamic with a knob with load-awareness, where we measure the ratio alpha = (computation for matched tokens / computation for unique tokens) as the knob. For example, if the overall GPU load is quite low (e.g., request rate is low), it would make sense to favor exploitation more by setting this knob alpha lower than 1. This retreats to your fixed design when alpha = 1.

2 - " E2 calculates all three costs as GPU computation time and finds the GPU with the lowest sum." Would it be better if this could be designed as a weighted sum to prevent any dominant components out of the three parts?

3 - The paper mentions that it provides prefill-decoding balancing. How does Preble interact with or integrate with existing continuous batching [1] and chunked prefill [2, 3] techniques?

4 - Minor writing issues: in Appendix C, Figure 11, SGLang should be vLLM in the legends?

[1] Kwon, Woosuk, et al. "Efficient memory management for large language model serving with pagedattention." Proceedings of the 29th Symposium on Operating Systems Principles. 2023.

[2] Zhong, Yinmin, et al. "{DistServe}: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Serving." 18th USENIX Symposium on Operating Systems Design and Implementation (OSDI 24). 2024.

[3] Agrawal, Amey, et al. "Taming {Throughput-Latency} Tradeoff in {LLM} Inference with {Sarathi-Serve}." 18th USENIX Symposium on Operating Systems Design and Implementation (OSDI 24). 2024.

---

confidence: 3
contribution: 3
initial_rating: 8
presentation: 3
questions: Thank you for submitting the work to ICLR 2025! I enjoy reading it. 
I think the problem statement is clear, the design and implementation of the scheduler make sense on a high level, and the evaluation results show clear performance benefits. 
Therefore, I would recommend an accept for this paper. I do have a few questions though and it would be great if the authors could address them.

In terms of the global scheduler for scheduling requests, I am a bit confused about why Preble chooses to favor exploitation over exploration on the point when the amount of recomputation saved (i.e. number of tokens in the matched prefix) is larger than the amount of new computation (i.e. number of tokens in the remaining prompt). 
As far as I am concerned, if a request has a partial overlapping prompt with the prefix cache, it seems to always be beneficial to use the prefix.
This is because, as pointed out in the paper, the prefill latency grows roughly linearly with the number of tokens, so saving the number of tokens needing to compute could reduce prefill latency.
It is true that doing so naively may lead to load imbalance between GPUs, but my feeling is that the load within different GPUs holding the same prefix should play a part in determining whether the scheduler should explore or exploit, instead of merely using the number of tokens as the determining condition.

I am also not sure if the workloads chosen in the paper could fully reflect the real-world distributed LLM serving setting.
How would the sharing ratio be on some chat datasets such as ShareGPT or LMSYS?
In addition, the current evaluation is done on the five datasets respectively. 
However, in a real serving scenario, there may be a set of LLM applications running on top of the same LLM backend at the same time. 
It may be beneficial to show how Preble performs when requests are drawn from different datasets.

Other questions:
1. In Sec 3.2, it says "If an existing tree node only matches partially to the new request, we split the node into the matched part and the remaining part." How often does this happen and would this split incur much overhead?
2. For the case of "exploitation", the algorithm first selects GPUs that have the tree node with the longest tokens in the matched prefix, then selects the GPU with the lightest request load among them. Is this always optimal? What about the case that you have a GPU that has the second longest tokens in the matched prefix but an even lighter load?
3. I find it a bit unintuitive that the value of time window H does not affect the end-to-end results. Have any evaluations been done to evaluate the effect of different time window values?
4. In Sec 4.4, it says "Other workloads and distributions benefit from a different set of techniques." What do you mean by that?
5. In Sec 4.4, it says "One Preble global scheduler can sustain at least 70 to 391 concurrent A100 GPUs", Could you kindly explain how these numbers are calculated and obtained?
soundness: 3
strengths: 1. Good observation that the prefix sharing ratio is high among popular LLM applications.
2. The two-level scheduling algorithms overall make sense.
3. The evaluation results show solid improvement in request latency compared to SOTA systems.
summary: In some applications of LLMs, prompts can be much longer than decode length and could be potentially shared across requests. 
However, existing works on KV cache sharing only target a single GPU setting, lacking a cache-aware system for distributed LLM serving.
This paper proposes Preble, a distributed LLM serving platform that utilizes prompt sharing efficiently. 
The core of Preble is a two-level scheduler containing a global request scheduler and a local iteration scheduler.
The global scheduler schedules requests based on exploitation and exploration, trading off between load balancing and prefix sharing.
The local iteration scheduler performs priority-based scheduling to ensure fairness.
Evaluations show that Preble can improve greatly on average and p99 request latency compared to SOTA systems.
weaknesses: 1. Lack of justification for some scheduling decisions made in the paper.
2. The workload may not reflect the real distributed LLM serving scenario.

Meta-review: The paper proposes "Preble," a distributed LLM serving platform optimizing prompt sharing and co-optimizing KV state reuse with computation load-balancing. The authors introduce hierarchical scheduling mechanisms and a novel algorithm, E2, which purportedly outperforms existing systems like vLLM and SG-Lang. Experiments with real-world workloads demonstrate improvements in latency and cache utilization.

Strengths: The problem addressed—efficient distributed prompt sharing in large-scale LLM serving systems—is significant and timely. The proposed scheduling algorithm is conceptually innovative, and the authors provide comprehensive experimental evaluations. The paper is well-written and supported by figures and experiments that validate its claims. Additionally, the authors’ rebuttal effectively clarified technical details and addressed reviewer concerns, demonstrating thoughtfulness and flexibility in their approach.

Weaknesses: Some concerns remain regarding novelty, as related systems like MemServe and SG-Lang address similar issues. Scalability evaluations are limited to four GPUs, which may not fully capture real-world scenarios. However, the authors provided compelling justifications for these limitations and demonstrated that the proposed method offers meaningful contributions, particularly in balancing load and optimizing prompt-sharing mechanisms.

The decision to accept is based on the paper’s potential impact on distributed LLM serving systems and its technical contributions, which outweigh the noted limitations.

Decision: Accept (Poster)