arXiv:2610.36355cs.AIOct 2026

Manuscript Offprint

arXiv:2610.36355

WAKMan: Workload Aware KVCache Manager

Suhas Kumar Morisetty, Vaibhavi Lokegaonkar, Sachin Mathew Varghese, Wesley Harris

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Prefix caching enables a Large Language Model (LLM) servers to reuse the Key-Value (KV) states and accelerate prefill computation stage for requests that share a prefix with earlier prompts, thus reducing latency and serving cost. With limited memory resource, the KV cache eviction policy becomes a decisive factor in determining the overall benefits of prefix caching. Production traffic may have single-turn, multi-turn, agentic, or a mixture of any combination of these request types. Our findings indicate that agentic steps return within seconds and favor recency, while popular prompts and long conversations return after many other requests and favor frequency. Across 20 mixes, no single policy is always best: vLLM's default strategy LRU provides 12% higher cache hits as compared to the frequency-oriented S3FIFO on agentic-heavy mixes but trails it by up to 22% elsewhere, and even a single workload parameter can flip the winner even for any particular mix. We present WAKMan, a workload-aware KV cache manager that picks its eviction policy from live traffic without knowing request types or reading prompts. It improves hit rate over LRU by 5 percentage points on average, with the lowest mean and worst-case optimality gap of all policies.

1 Introduction

Serving Large Language Models (LLMs) efficiently at scale has become a prominent challenge in system design. LLM inference process involves generating the key and value vectors of each prompt token based on its preceding context. Requests that share a prompt prefix therefore produce identical KV states, and storing these can avoid unwanted recomputation. Most LLM servers store this KV cache in the GPU memory so that future requests with a common prefix can reuse these KV blocks. Since GPU memory is limited, cached blocks require eviction in order to store newer KV

Figure

Figure 1: Hit-rate difference (S3FIFO – LRU) across 21 request mixes. Purple: S3FIFO better. Yellow: LRU better. No single policy wins everywhere.

blocks. KV blocks will have to be recomputed if a particular block is required immediately after it gets evicted thus increasing the latency and computation cost for that request. Hence, selecting which KV blocks to evict is critical for extracting maximum performance from an LLM system, and the right strategy depends on how blocks are reused across requests.

LLM serving traffic can be a mix of three types of requests: single-turn, multi-turn, and agentic (Appendix E). These differ in length of prefix they share and how quickly a shared prefix is requested again. vLLM(Kwon et al., 2023) evicts blocks in Least Recently Used (LRU) order by default. LRU strategy works well when shared prefixes return quickly, as in agentic sessions. It fares suboptimally when many one-time blocks, such as single-turn payloads, push out blocks that will be reused later, such as fixed prompts and long conversation histories. Scan-resistant policies such as S3FIFO protect these blocks, but they can evict fast-returning agentic blocks before their next use. Figure 1 shows the this effect across mixes of the three request types. S3FIFO is better when single-turn or multi-turn requests dominate, while LRU is better when agentic requests dominate. The better policy also changes when the mix is fixed and a workload parameter, such as the number of turns per conversation, changes (Figure 3). Since traffic also shifts over time, this makes selecting a policy upfront suboptimal.

∗^{*}Equal contribution. Author order was determined by a coin toss. Work done during internship at Capital One.

1^{1}Columbia University, vm2825@columbia.edu

2^{2}University of Maryland, College Park, vlokegao@umd.edu

3^{3}Capital One, {sachinmathew.varghese, wesley.harris}@capitalone.com

Recent systems improve on LRU strategy by making KV cache eviction aware of the request type. UniCache (Yang et al., 2026) and SAECache (Fang et al., 2026) keep separate queues for agentic, chat, and single-turn requests, and a study of Alibaba's production traces models KV cache reuse by request type and turn number (Wang et al., 2026). Other systems predict when a prefix will be reused, either with a trained model (Fang et al., 2026) or with inter-access time distributions fit on past traces (Yang et al., 2026; Wang et al., 2026; Li et al., 2026). These methods make two assumptions: the server knows each request's type and turn, and reuse timing stays stable over time. Neither holds in any large-scale shared deployment serving multiple use cases. As requests arrive, conversation or agent history is concatenated on the client side. The server cannot recover a request's type or turn due to data-sharing and data-privacy restrictions in most shared deployments. The traffic mix also keeps shifting, so a distribution fit on past traces may no longer hold. A policy for serving must therefore rely only on what the cache itself observes.

We propose WAKMan, a workload-aware KV cache manager that selects its eviction policy from live traffic (Figure 1). WAKMan runs shadow copies of LRU and S3FIFO alongside the server. At fixed intervals, it replays the most recent trace on both and switches the server to the policy with the higher simulated hit rate. WAKMan uses only the block hashes that vLLM already computes. It needs no request types, no prompt content, and no offline training, and it does not change model outputs. Unlike adaptive policies such as ARC (Megiddo and Modha, 2003) and LeCaR (Vietri et al., 2018), which adjust within a single cache on every request, WAKMan selects one complete policy per interval (Section 2). This keeps the eviction path simple, and any policy that can be simulated can join the candidate pool.

We evaluate WAKMan on 19 synthetic workloads with different mixes of single-turn, multi-turn, and agentic requests, served with Gemma on vLLM. WAKMan improves the hit rate over LRU, the vLLM default, by 5 points on average. To test whether a single candidate policy would suffice, we also run S3FIFO n. S3FIFO is better than LRU on most workload mixes, but it falls well behind on agentic-heavy mixes, where LRU is better. WAKMan follows the policy that fits the current traffic, and it has the lowest gap between its cache hit rate and that of the ideal cache policy of the three policies.

References (23)