arXiv Science⌕ Search

arXiv · 2610.22863

Understanding KV Residency in Production-Scale Agentic LLM Workloads

Abstract

Agentic large language model (LLM) applications turn one user request into a sequence of model and tool calls over a growing context. Retaining this context's key-value (KV) state in GPU memory lets later calls reuse it instead of recomputing it, but at fleet scale this needs substantial memory. We characterize four production Microsoft M365 workload traces (Deep Research, Enterprise Assistant, Coding Agent and Enterprise Chat) spanning more than 121 million model calls. In Deep Research, the application issues 89% of model calls and the median context grows from about 10K to 68K tokens by the 30th call. About 80% of context tokens are served from the prefix cache. With the public Llama-2-70B KV layout standing in for confidential models, one 99th-percentile Deep Research session exceeds the 80 GB HBM of an NVIDIA H100, and holding all live sessions at their peak needs an estimated 501.8 TB of HBM, although inference occupies only 5.6% of that retention time. Trace-driven replay shows that a one-hour idle cap cuts this ceiling by 3.6x while raising the share of calls that recompute context only from 4.07% to 4.53%. Under tighter budgets, eviction alone is insufficient: at one tenth of the busiest hour's demand, LRU eviction makes 63% of Deep Research calls recompute and clairvoyant furthest-next-use 31%, whereas multi-resolution retention (MRR), which demotes the LRU session's KV state to int4, lowers this to 13.6%. Placement imposes a separate limit: when the next call reaches a different deployment, cached-context reuse drops from 89% to 29%, and treating KV state as deployment-local raises the recompute floor under unlimited memory from 5.4% to 20.2%. These findings motivate retention that changes the representation of KV state, together with deployment-aware routing or migration. We plan to release AgenticTraceSim, a parametric trace generator, and a residency replay framework.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Mayank Arya, Agrim Bari, Anjaly Parayil, Yogesh Simmhan, Renee St. Amant, Victor Rühle, Saravan Rajmohan. 2026-10-16. Understanding KV Residency in Production-Scale Agentic LLM Workloads. https://arxiv.org/abs/2610.22863

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Load Balancing with Evolving Workloads in Large-Scale Language Model Serving

Serving large language models requires assigning requests whose workloads grow during processing and whose completion times are unknown. With a synchronization barrier, lightly loaded workers wait for the slowest worker at every decode iteration. We model this loss through aggregate workload imbalance and formulate a joint admission and assignment problem with sticky requests and capacity limits. Short lookahead incorporates predicted completions of ongoing requests. For exact optimization without lookahead, we prove a comparison under independent geometric decode lengths, bounded independent nondegenerate prompt sizes, and batched releases satisfying a cumulative supply condition. The long-run expected imbalance improvement over first come, first served admission with request-count join-shortest-queue grows at least as the square root of the product of worker capacity and the logarithm of worker count, in the stated scaling regime. The comparison extends to capacity-aware round robin, random routing, and power of two choices. BalanceRoute approximations connect the formulation to practical routing. Experiments using up to 144 NPUs with proprietary and public traces show lower workload spread and higher throughput than the evaluated baselines. These empirical results complement the guarantee for exact optimization.

cs.DC↗

Coral: Cost-Efficient Multi-LLM Serving over Heterogeneous Cloud GPUs

The landscape of large language models (LLMs) has become increasingly fragmented, with no single model dominating the field. Meanwhile, cloud providers offer a diverse array of mid-tier and older-generation GPUs. These heterogeneous resources provide better availability and deliver comparable performance-per-dollar to top-tier hardware. To efficiently harness these GPUs for concurrent multi-LLM serving, we introduce Coral: an adaptive, heterogeneity-aware serving system. The key idea behind Coral is the joint optimization of resource allocation and replica serving strategies across all models. To keep pace with shifting throughput demands and resource availability, Coral employs a lossless, two-stage decomposition. This approach preserves joint optimality while reducing online solve times from hours to mere tens of seconds. Evaluations across 6 models and 20 GPU configurations demonstrate that Coral reduces serving costs by up to 2.79$\times$ compared to the strongest baseline, while delivering up to 2.39$\times$ higher goodput under scarce resource constraints.

cs.DC↗

Domain Extension of Lock-Freedom and Wait-Freedom for Group Computations

A domain extension of a definition refers to broadening the scope of a definition so that it applies to a larger set of cases than originally specified. The notion of lock-free and wait-free computation is designed for the domain of tasks that are completed by a single thread (in competition with other threads). The goal of this paper is to extend the definition of lock-freedom and wait-freedom to group-computations (denoted by gl-freedom and gw-freedom) that require that the task at hand must be completed by a collaboration between multiple threads. When extending a definition, certain constraints must be respected: the new domain must remain logically consistent with the original meaning, the extension should not introduce contradictions or ambiguities, and it must preserve the essential properties that make the definition valid and useful. We demonstrate this by showing that our extended definition is consistent with the original definition when the group consists of a single thread. We note that extension allows us to characterize programs in a new domain (distributed computing, NUMA computation systems, systems with private data for different threads, etc.) instead of relegating them to be in the same category (deadlock/livelock-free) without regard to the actual properties of that program. We also illustrate this definition with various examples.

cs.DC↗