Libra: Flexible Request Partitioning and Scheduling for Serving Unbalanced and Dynamic LLM Workloads

Chaoyi Ruan (National University of Singapore), Yinhe Chen (University of Science and Technology of China), Dongqi Tian (University of Science and Technology of China), Yandong Shi (University of Science and Technology of China), Yongji Wu (UC Berkeley), Jialin Li (National University of Singapore), Cheng Li (University of Science and Technology of China and Institute of Artificial Intelligence, Hefei Comprehensive National Science Center)

23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 2 · Scalable Storage Systems

Overview

Large Language Model (LLM) serving systems face a fundamental operational challenge: incoming inference requests vary wildly in prompt length and generation length, creating severe imbalances across GPU compute resources. Traditionally, serving systems choose between two architectural paradigms: chunked prefill (colocating prefill and decode tasks on the same GPUs) or PD (Prefill-Decode) disaggregation (separating prefill and decode onto dedicated GPU pools connected via high-speed networks like RDMA). While chunked prefill maintains high hardware utilization, prefill computations interfere with decode tokens, causing severe tail-latency spikes. Conversely, PD disaggregation protects decode latency but suffers from severe resource idleness when the workload shifts between prompt-heavy and decode-heavy distributions.

Watch on YouTube · Slides

Visual summary for Libra: Flexible Request Partitioning and Scheduling for Serving Unbalanced and Dynamic LLM Workloads by Chaoyi Ruan, Yinhe Chen, Dongqi Tian, Yandong Shi, Yongji Wu, Jialin Li, Cheng Li
Visual summary for Libra: Flexible Request Partitioning and Scheduling for Serving Unbalanced and Dynamic LLM Workloads by Chaoyi Ruan, Yinhe Chen, Dongqi Tian, Yandong Shi, Yongji Wu, Jialin Li, Cheng Li

Key moments

  1. 0:00 Introduction and background on LLM serving phases
  2. 1:32 Comparison of chunked prefill and PD disaggregation designs
  3. 2:35 Real production workload analysis and dynamic characteristics
  4. 6:15 Introduction to Libra and Flexible Request Partitioning and Scheduling
  5. 7:35 Global architecture and components of Libra
  6. 8:35 Global scheduler design and optimal request splitting
  7. 11:58 Local scheduler and batch composition strategies
  8. 13:30 KV cache streaming and transfer optimizations

Libra: Flexible Request Partitioning and Scheduling for Serving Unbalanced and Dynamic LLM Workloads

Speakers: Chaoyi Ruan (National University of Singapore); Yinhe Chen (University of Science and Technology of China); Dongqi Tian (University of Science and Technology of China); Yandong Shi (University of Science and Technology of China); Yongji Wu (UC Berkeley); Jialin Li (National University of Singapore); Cheng Li (University of Science and Technology of China and Institute of Artificial Intelligence, Hefei Comprehensive National Science Center)

Conference: USENIX NSDI

YouTube: https://www.youtube.com/watch?v=cubqt4xsTkA

Overview

Large Language Model (LLM) serving systems face a fundamental operational challenge: incoming inference requests vary wildly in prompt length and generation length, creating severe imbalances across GPU compute resources. Traditionally, serving systems choose between two architectural paradigms: chunked prefill (colocating prefill and decode tasks on the same GPUs) or PD (Prefill-Decode) disaggregation (separating prefill and decode onto dedicated GPU pools connected via high-speed networks like RDMA). While chunked prefill maintains high hardware utilization, prefill computations interfere with decode tokens, causing severe tail-latency spikes. Conversely, PD disaggregation protects decode latency but suffers from severe resource idleness when the workload shifts between prompt-heavy and decode-heavy distributions.

This talk introduces Libra, a system designed to solve this hardware utilization and latency dilemma through Flexible Request Partitioning and Scheduling (FPS). Instead of forcing routing decisions at rigid prompt boundaries or locking instances into dedicated roles, Libra can split any inference request at arbitrary token positions—whether inside the prefill phase or the decode phase. By dynamically partitioning requests and scheduling them across interchangeable GPU instances with pipelined KV cache transfers, Libra eliminates hardware idleness while strictly adhering to Service Level Objectives (SLOs).

Background

▶ Watch: Introduction and background on LLM serving phases (0:00)

LLM inference execution is bifurcated into two distinct phases with fundamentally different computational profiles. The prefill phase consumes the entire prompt in a single forward pass, making it a compute-bound workload that easily saturates GPU tensor cores. Its responsiveness is measured by Time to First Token (TTFT). The decode phase reuses the KV cache generated during prefill, emitting tokens autoregressively one by one. It is strictly memory-bound, limited by High Bandwidth Memory (HBM) bandwidth rather than compute, and its smoothness is measured by Time Per Output Token (TPOT).

Because prefill and decode have disparate resource requirements and SLO metrics, the ML systems community developed two primary serving architectures:

  1. Chunked Prefill (e.g., vLLM / Chunked Prefill implementations): Interleaves prefill chunks with decode tokens on the same GPUs. This yields high utilization but causes prefill tasks to "jam" the processing queue, degrading decode tail latency.
  2. PD Disaggregation (e.g., Sarathi-Serve / Splitwise architectures): Segregates prefill and decode onto separate physical GPUs. However, the optimal prefill-to-decode GPU ratio is static and fixed at deployment time.

Real-world production traces—such as Azure code-assistance traces and BurstGPT workloads—demonstrate that traffic patterns fluctuate dynamically between prompt-dominant periods (e.g., summarizing massive documents) and generation-dominant periods (e.g., writing long stories). In a disaggregated setup, a prompt-heavy workload overloads the prefill GPUs while decode GPUs sit idle; conversely, a decode-heavy workload starves the prefill GPUs. Static provisioning inevitably strands expensive hardware.

Key Findings

▶ Watch: Real production workload analysis and dynamic characteristics (2:35)

Control benchmarks conducted across three distinct workload shapes (prompt-heavy with 8,000 input tokens / 32 output tokens; balanced at 2,000 input / 512 output; and decode-heavy with 200 input / 1,400 output) reveal clear operational tradeoffs:

  • Disaggregation provides robust SLO attainment (often 100%) but suffers from throughput collapses (e.g., dropping to 0.83 requests per second [RPS] on single GPUs) when the workload shape mismatched the provisioned ratio.
  • Colocation pushes raw throughput higher (e.g., 1.49 RPS) but causes SLO attainment to degrade significantly under heavy prefill interference.
  • No static hardware configuration satisfies both throughput and reliability goals across dynamic production traces.

Libra resolves this tension by abandoning rigid boundaries. Across comprehensive evaluations using the Llama model family (ranging from 14B to 72B parameters) and production traces like BurstGPT and Azure workloads, Libra achieves:

  • Up to 91% goodput improvements over colocation baselines, and up to 61% over traditional PD disaggregation.
  • Serving capacity improvements (maximum sustained QPS under strict SLO constraints) of up to 2.37× over PD colocation and 1.37× over PD disaggregation.
  • Consistent performance gains of 50% to 60% on hybrid production traces.

Technical Deep Dive

▶ Watch: Global architecture and components of Libra (7:35)

Libra’s architecture rests on three core technical pillars: a global scheduler utilizing queueing theory and binary search, a local batch-composition scheduler, and an optimized streaming KV cache transfer mechanism.

Global Scheduling and the Equilibrium Solver

The global scheduler sits in front of all GPU instances. Drawing from queueing theory, the end-to-end latency of a partitioned request is determined by whichever GPU finishes last. When evaluating a request with a total length of $N$ tokens, sweeping the split point from left to right yields two intersecting performance curves:

  • GPU 1 (Taking earlier tokens, including prefill): Throughput drops as the split point moves right because it shoulders more compute-heavy prefill operations.
  • GPU 2 (Taking later tokens, including decode): Throughput rises as the split point moves right because fewer total tokens land on it.

The intersection point of these two curves represents the exact performance equilibrium where both GPUs finish at identical rates, maximizing system throughput. Traditional systems like vLLM are forced to cut rigidly at the prompt boundary (e.g., token 1,024, yielding 1.1 RPS), whereas Libra identifies the exact equilibrium point (e.g., token 1,058), boosting throughput to 2.5 RPS—a nearly 50% gain on a single request.

To compute this dynamically without excessive overhead, Libra employs a binary search solver on the partition ratio. Starting from the standard prefill-decode distribution point, it predicts execution times using cumulative metrics collected from previous requests. It bisects the search space until execution times converge within an $\epsilon$ threshold, capped at a strict maximum of 6 iterations. Once split, the resulting micro-requests are routed using a least-loaded policy with round-robin tie-breaking.

Local Scheduler and Batch Composition

Unlike traditional serving engines that construct batches based purely on aggregate batch size without inspecting request semantics, Libra’s local scheduler jointly tunes batch size, prefill-to-decode ratio, and decode context length under active SLO constraints. For example, when a batch carries a heavy prefill load (e.g., ~2,000 prompt tokens), adding decode requests will immediately breach latency SLOs. Conversely, under light prefill loads (~500 tokens), the local scheduler safely packs approximately 30 decode tokens into the batch, maximizing hardware utilization.

Pipelined KV Cache Transfer

In standard disaggregated systems, the entire KV cache is transferred downstream only after prompt prefill completes. Libra introduces streaming KV transfer in pieces. As soon as a prefill chunk finishes on the first GPU, its corresponding KV cache state is immediately shipped to the second GPU while the first GPU transitions to the next compute task. This streaming overlap hides transfer latency, achieving a 94% transfer overlap rate across evaluations.

Experimental Setup & Results

▶ Watch: Global scheduler design and optimal request splitting (8:35)

The evaluation benchmarks Libra across the Llama model family in scales from 14B to 72B parameters. The system is tested against four distinct workload distributions, comparing against two baseline serving modes: standard chunked prefill (colocation) and standard PD disaggregation. Metrics focus on goodput, serving capacity (maximum sustained QPS under SLO), and SLO attainment rates.

  • Goodput Gains: Libra outperforms standard colocation by up to 91% and PD disaggregation by up to 61% across mixed configurations.
  • Serving Capacity: Libra delivers up to 2.37× higher sustained QPS than PD colocation and 1.37× over PD disaggregation while maintaining strict request SLOs.
  • Production Traces: Under hybrid workloads combining BurstGPT and Azure production traces, Libra maintains a 50% to 60% performance gain over static baselines.
  • Context Length Tuning (Context-Length-Tuning / CLT): By relaxing SLO constraints on invisible operations like sinking tokens, Libra enables multi-way splitting (e.g., splitting a single request into three micro-requests), yielding an additional 12% to 41% performance improvement over baseline disaggregation.

Practical Implications

▶ Watch: KV cache streaming and transfer optimizations (13:30)

For infrastructure teams and LLM platform engineers, Libra demonstrates that rigid architectural boundaries—whether forcing prefill and decode onto the same hardware or locking GPUs into permanent disaggregated roles—are suboptimal for variable production traffic.

  • Hardware Efficiency: Deploying Libra allows organizations to provision fewer total GPUs to handle peak bursty workloads, as compute resources dynamically morph between prefill and decode responsibilities per request.
  • Deployment Simplicity: Rather than manually tuning the static prefill-to-decode GPU ratio for specific application profiles (e.g., code generation vs. summarization), operators can rely on Libra's interchangeable instance pool.
  • Tradeoffs: The primary trade-off introduced by Libra is system complexity: maintaining real-time performance predictors, executing boundary-search solvers per incoming request, and managing fine-grained KV cache streaming require sophisticated control planes atop standard inference engines.

Key Takeaways

  • Dynamic Workload Mismatch: Real-world LLM traces (BurstGPT, Azure) exhibit wild fluctuations between prefill-heavy and decode-heavy periods, rendering static chunked prefill and rigid PD disaggregation inefficient.
  • Flexible Request Partitioning (FPS): Libra enables requests to be split at any token position—within prefill or decode phases—transforming static boundaries into fluid optimization targets.
  • Queueing Theory Equilibrium: The global scheduler uses a rapid binary search bounded to 6 iterations to find the exact token split point where prefill and decode GPUs balance throughput, boosting single-request throughput by ~50%.
  • Joint Local Scheduling: Local schedulers inspect batch composition (prefill-to-decode ratios and context lengths) rather than just aggregate batch size to prevent SLO violations.
  • Streamed KV Transfer: Pipelining KV cache transfers in pieces achieves a 94% transfer overlap, eliminating idle bubbles between micro-requests.
  • Substantial Gains: Libra achieves up to 2.37× higher serving capacity and 91% higher goodput compared to existing state-of-the-art serving frameworks.

About the Speaker(s)

Chaoyi Ruan is a researcher at the National University of Singapore (NUS), specializing in systems for machine learning and LLM inference optimization. This work was conducted as a joint collaboration with researchers from the University of Science and Technology of China (USTC), UC Berkeley, and the Institute of Artificial Intelligence at the Hefei Comprehensive National Science Center.

Reviews

→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)

All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)