HAServe: Horizon-Aware Scheduling and Memory Co-Design for Efficient LLM Serving
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: I'm Tom.
Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.
Tom: Today's paper: "HAServe: Horizon-Aware Scheduling and Memory Co-Design for Efficient LLM Serving".
Jane: The gist The PRISM architecture co-designs request scheduling and KV-cache management to optimize fast online LLM serving for segmented and skewed workloads,
Tom: First, who's behind it and why it matters.
Title and authors: Tom: So we're looking at this paper, "HAServe: Horizon-Aware Scheduling and Memory Co-Design for Efficient LLM Serving." It sounds like they're trying to fix a problem where online LLM services, especially with RAG or agent systems, have two main issues: prompt segmentation and hotspot skew.
Jane: Prompt segmentation means the text is broken into pieces, like system instructions or retrieved passages, and hotspot skew means a small set of those pieces gets used over and over again by many different requests.
Lu: They're tackling this by trying to use both request scheduling and KV-cache management together instead of doing them separately. That sounds like the core idea here.
Meng: So what does that mean in practice? Does it just make things faster, or are we looking at a fundamental shift in how we run these models at scale?
Lalam: I'm seeing that they are aiming to reduce tail latency and improve cache hit rates across RAG and agent tasks by addressing those patterns simultaneously, which is what this paper is about.
The paper's summary: Tom: The paper introduces a co-design approach involving a Query-Aware Scheduler and a Demand-aware Radix Tree for KV-cache management, which they call PRISM. This system aims to optimize fast online LLM serving by aligning request admission with exact-prefix KV retention.
Jane: That means the scheduler reorders requests based on reusable segments, and then the cache manager makes smart decisions about which parts of the KV-cache to keep when memory is tight. It’s about making sure hot shared prefixes stay in memory even under pressure.
Lu: They build a Query-Aware Scheduler that tracks reusable segment counters to generate order-sensitive bucket signatures, which helps group requests with the same segments into what they call hot lanes, improving KV-cache locality.
Meng: I like the idea of grouping requests; that sounds like it could help us manage GPU memory better when we have a skewed workload hitting our system. But how do you handle the actual decision-making when things get crowded?
Lalam: The Demand-aware Radix Tree, or DART, integrates this scheduling metadata into a KV-cache tree, using dispatch-batch priority to decide which resident KV-cache anchors should survive memory pressure, protecting those high-value shared prefixes.
The paper's improvements: Tom: One major improvement they highlight is that they provide a bottleneck analysis linking TTFT behavior to admission wait, exact-prefix prefill work, KV pressure, and service-knee behavior on a single GPU. They model performance using an approximate M/G/one queueing model <ref:2605.08581#pg1>.
Jane: That analysis shows that if the realized full-prompt token-level exact-prefix hit rate gap is non-negative, then the PRISM system's performance, measured as µPRISM, is greater than or equal to the performance of a standard LRU cache, µLRU.
Lu: The equality holds only when that exact-prefix hit rate gap is exactly zero. This suggests that for PRISM to be better than a simpler method, you need some actual reuse in the data structure.
Meng: So what are the practical results on models? Are we talking about measurable improvements in latency under real load, or just theoretical gains? I need to know how much work this actually saves us at scale.
Lalam: Experimentally, they show that PRISM reduces average per-QPS P99 TTFT by twenty-three point three percent on Qwen3-4B-Instruct-two thousand five hundred seven and by thirty-seven point one percent on Llama2-13B compared to the strongest baseline methods.
Conclusion: Tom: So, to wrap up, PRISM is a co-design between a query-aware scheduler and demand-aware KV-cache management that jointly optimizes request scheduling and memory management. This leads to significant reductions in tail latency and improvements in cache utilization across RAG and agent tasks.
Jane: It means we can achieve higher exact-prefix KV-cache hit rates, which is really important for RAG applications where you're relying on retrieving specific passages. The paper shows that the system performs well even when the reusable prefixes don't perfectly match retrieved passages, as long as demand hints are available at admission time.
Lu: The key implication is that we need to move toward a design where segment-level management tracks reusable context pieces rather than just whole requests because segments recur more often across users or sessions.
Meng: I think the practical value is seeing those measurable latency reductions, like the twenty-three point three percent on Qwen3-4B-Instruct-two thousand five hundred seven because that shows a tangible benefit for deployment performance under skewed segment arrivals.
Lalam: For agent systems specifically, they suggest treating things like domain policies or tool schemas as reusable segments so the scheduler can estimate their near-future demand at admission time. This whole HAServe work is about co-optimizing scheduling and memory to get better serving efficiency.
Wuhan University · Amazon
cs.LG
Submitted: 2026-05-09
Updated: 2026-10-13
Comments: 25 pages, 9 figures, Preprint
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 88/100
The gist: The gist The PRISM architecture co-designs request scheduling and KV-cache management to optimize fast online LLM serving for segmented and skewed workloads, achieving significant reductions in tail
Key concepts
- HorizonSchema
- A workload abstraction that connects exact prefix paths, permitted serializations, and released consumers. It serves as a shared input for both the decision of admitting new requests and deciding which KV-cache entries should be retained.
- QAS (Query-Aware Scheduler)
- A scheduler that tracks reusable segment counters across the request lifecycle to create order-sensitive bucket signatures. It uses these priorities to score buckets, filling hot lanes by scanning buckets in descending score order to improve KV-cache locality.
- DART (Demand-aware Radix Tree)
- A radix KV-cache tree that annotates boundary nodes with QAS metadata. DART uses the dispatch-batch priority to decide which resident KV-cache anchors should survive memory pressure, protecting high-value shared prefixes from eviction.
Terminology
Summary
The gist The PRISM architecture co-designs request scheduling and KV-cache management to optimize fast online LLM serving for segmented and skewed workloads, achieving significant reductions in tail latency and improvements in cache hit rates across RAG and agent tasks.
How it works
PRISM introduces a Query-Aware Scheduler (QAS) which tracks reusable-segment counters across the request lifecycle to generate order-sensitive bucket signatures The QAS uses these segment priorities to create bucket scores, where Score(b) = αsizeT [b] + βutilU(b), and then fills hot lanes by scanning buckets in descending Score(b) order. This mechanism groups requests with the same reusable segments into hot lanes to improve KV-cache locality.
Demand-Aware Radix Tree (DART)
DART integrates these QAS metadata into a radix KV-cache tree, annotating selected boundary nodes with QAS metadata. DART then uses the dispatch-batch priority to decide which resident KV-cache anchors should survive memory pressure, protecting high-value shared prefixes. The eviction ordering is defined by EvictKey(u) = 0, last(u), u is a private-suffix node, 1, Pbt(seg(u)), last(u), u is a reusable node with u /∈ Ft, 2, last(u), u ∈ Ft is a protected reusable anchor.
Bottleneck Analysis and Queueing Model
The paper provides a bottleneck analysis linking TTFT behavior to admission wait, exact-prefix prefill work, KV pressure, and service-knee behavior on a single GPU. The performance is modeled using an approximate M/G/1 queueing model where the request-level sustainable arrival rate equals µπ requests/s. Theorem 1 shows that if the realized full-prompt token-level exact-prefix hit-rate gap ∆h is nonnegative, then µPRISM − µLRU ≥ 0, with equality iff ∆h = 0.
Experimental Results and Performance Gains
The experimental results show strong performance across different datasets and models. PRISM reduces average per-QPS P99 TTFT by 23.3% on Qwen3-4B-Instruct-2507 and 37.1% on Llama2-13B versus the strongest baseline. PRISM achieves the highest KV-cache hit rate across all methods and reduces P99 TTFT by 63.5% and 80.8% relative to native SGLang.
Robustness and Generalization
PRISM's advantage is not specific to segment-based RAG prompts, as it also performs well on agent-style workloads. The results support the intended scope of PRISM, showing that the system does not assume that reusable prefixes correspond to retrieved passages but only that near-future demand over repeated, token-identical prompt regions can be estimated at admission time. The evaluation also shows that PRISM can improve KV-cache hit rate and lower tail TTFT across various workloads, rather than depending on a specific hotspot distribution.
The PRISM architecture successfully co-optimizes request scheduling and KV-cache management to reduce tail latency and improve cache utilization in online LLM serving systems.
--- Page 1 ---
PRISM: Fast Online LLM Serving via Scheduling-Memory Co-design
Xingyu Qu, School of Computer Science, Wuhan University, whu-quxy@whu.edu.cn Tianhao Lin, School of Computer Science, Wuhan University, lintianhao@whu.edu.cn Yiqi Li, School of Computer Science, Wuhan University, bruceprofession@whu.edu.cn Zhiyu Chen Amazon zhiyuche@amazon.com Sheng Wang, School of Computer Science, Wuhan University swangcs@whu.edu.cn
--- Page 2 ---
PRISM: Fast Online LLM Serving via Scheduling-Memory Co-design
KV-Cache-oblivious retention root sys A p1 p2 arriving request cold cold MISS the arriving request follows the matching path but the path breaks at evicted anchor A Demand-aware retention root sys A p1 p2 arriving request cold cold MATCH the arriving request follows the same path and matches protected anchor A protected root: radix root sys: system prefix A: reusable anchor pi: request-specific leaf q1: sys+A + p1 q2: arriving request sys+A + p2 containing A Figure 1 Demand-aware retention in a radix KV-cache tree.
--- Page 3 ---
PRISM: Fast Online LLM Serving via Scheduling-Memory Co-design
request admission (Dexter et al., 2025; Jiang et al., 2026). Under KV-cache pressure, however, a hot prefix may still be evicted before the next matching request arrives. KV-cache retention should therefore make demand-aware decisions to distinguish hot shared prefixes from cold private suffixes, which come from user input. As Figure 1 illustrates, without demand hints, cold branches may displace anchor A before the next matching request arrives. Instead, demand-aware retention protects A and evicts a cold branch, preserving an exact-prefix hit. This reduces prefill computation and, when coupled with hints from scheduling, lowers TTFT for subsequent hot-segment requests. This gap leads to three design requirements for online LLM serving (1) Segment-level management: the system should track reusable context pieces rather than only whole requests, because segments are more likely to recur across users or sessions when derived from the same source (2) Query-aware scheduling: the scheduler should use reusable-prefix information to reorder requests, improve KVcache locality, and pass this information to the KV-cache backend (3) Demand-aware KV retention: under memory pressure, the KV-cache manager should protect prefixes that are active or likely to be reused soon.
--- Page 4 ---
PRISM: Fast Online LLM Serving via Scheduling-Memory Co-design
We first develop a bottleneck analysis showing how admission control and KV-cache hit rate affect TTFT in different load regimes. Guided by this analysis, we present PRISM (Prefix Reuse Optimization Integrated Scheduling and Memory), which co-designs a query-aware scheduler (QAS) with a demand-aware radix tree (DART) to align request admission with exact-prefix KV retention. Overall, our contributions are threefold: • We provide a bottleneck analysis that links TTFT behavior to admission wait, exact-prefix prefill work, KV pressure, and service-knee behavior on a single GPU, motivating the need to optimize scheduling and KV-cache management jointly • We introduce PRISM, which optimizes online LLM serving with request scheduling and KV-cache management co-design • The experimental results show strong performance across different datasets and models.
--- Page 5 ---
PRISM: Fast Online LLM Serving via Scheduling-Memory Co-design
2.1 LONG-PREFIX REQUESTS AS A COMMON SERVING ABSTRACTION Many online LLM services share the same structure as Eq. 1 once segments have been serialized into prompt tokens (1) where xsys is a shared system prompt, ri,j is a reusable-segment identity, mi is the number of reusable segments in qi, and xprivi is the request-specific suffix, which depends on user input (2) We refer to each identifiable reusable context piece as a segment. Second. Second accesses to these segments are often highly non-uniform and temporally local. Recent studies have shown that a small set of hot segments may recur across many requests within short windows (Wang et al., 2025; Li et al., 2025). These properties have motivated two lines of serving optimizations. Systems that optimize KV-cache memory management (Jin et al., 2026; Yao et al., 2025a; Jiang et al., 2026; Kwon et al., 2013; Zheng et al., 2014) exploit prompt structure to improve cache hit rate, while scheduling-oriented systems (Yu et al., 2013; Wu et al., 2014; Agrawal et al., 2024; Dexter et al., 2025) reorder admission and batching to place requests with shared prefix closer in time. However, optimizing scheduling and KV-cache management independently can leave substantial reuse unrealized under skewed segment arrivals. Scheduling can create prefix locality by reordering (1) but KV-cache retention should make demand-aware decisions to distinguish hot shared prefixes from cold private suffixes, which come from user input.
Improvements for AI systems
-
Continuous batching and chunked-prefill mechanisms can be refined by integrating a Query-Aware Scheduler (QAS) that uses
segment priorities
to generateorder-sensitive bucket signatures,
allowing requests to be grouped intohot lanes
based on shared reusable segments, which directly improves KV-cache locality. -
Demand-aware retention in the KV-cache should be implemented using a mechanism like DART, which uses
dispatch-batch priority
to decide anchor survival, ensuring thathot prefixes may still be evicted before the next matching request arrives
is mitigated by protecting anchors with thestrongest demand in the current dispatch batch.
-
The serving system can achieve higher throughput and lower tail latency by implementing a co-design where the scheduler and memory management are jointly optimized, as demonstrated by PRISM's results showing a reduction of
average per-QPS P99 TTFT by 23.3% on Qwen3-4B-Instruct-2507.
-
For RAG applications, the system can exploit
hotness-aware prefix sharing
by aligning KV retention with admission, as PRISM achieves a higherexact-prefix KV-cache hit rate
compared to baselines across different workloads. -
Agent systems can be improved by treating components like
domain policies, tool schemas, database records, and deterministic tool observations
asreusable segments,
allowing the scheduler to estimate theirnear-future demand at admission time.
Sources
- Evaluating Large Language Models Trained on Code
- LLM Query Scheduling with Prefix Reuse and Latency Constraints
- KVFlow: Efficient Prefix Caching for Accelerating LLM-Based Multi-Agent Workflows
- MultiHop-RAG: Benchmarking Retrieval-Augmented Generation for Multi-Hop Queries
- LLaMA: Open and Efficient Foundation Language Models
- RAGPulse: An Open-Source RAG Workload Trace to Optimize RAG Serving Systems
- Fast Distributed Inference Serving for Large Language Models
- Qwen3 Technical Report
- KVShare: An LLM Service System with Efficient and Effective Multi-Tenant KV Cache Reuse
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks