WAKMan Picks a KV-Cache Eviction Policy and Beats LRU by 5 Percentage Points
A team led by Suhas Kumar Morisetty, whose work was done during an internship at Capital One, has presented WAKMan. It is a KV-cache manager that chooses an eviction policy on its own to match the current traffic on an LLM server. It does not know request types and does not read prompts. The reason is that there is no universal winner. On agentic mixes, vLLM's LRU gets 12% more hits than S3FIFO, while on the other mixes it trails S3FIFO by up to 22%. On average, WAKMan adds 5 percentage points to hit rate relative to LRU. • Tested on 20 workload mixes • Agent steps return within seconds and favor recency • WAKMan has the smallest average and worst-case gap to the optimum
AI-processed from arXiv cs.AI; edited by Hamidun News
Prefix caching in LLM servers saves money and time, but only as long as the needed prefix stays in memory. Memory is limited, so the outcome depends on the KV-cache eviction policy. Researchers Suhas Kumar Morisetty and three co-authors, who worked on this during an internship at Capital One, tested popular strategies on 20 workload mixes. The conclusion is simple: there is no single best policy. They propose WAKMan, a manager that picks an eviction policy based on live traffic. On average, it improves hit rate by 5 percentage points over LRU.
Why agents and chatbots want different things from the cache
Prefix caching lets a server reuse Key-Value states for requests that share a prefix with earlier prompts. This speeds up the prefill stage and lowers latency and serving cost. But real production traffic is mixed: single requests, multi-turn conversations, agent chains, or any blend of them.
These request types have different "return times" to a prefix. Agent steps come back within a few seconds, so they need a cache that remembers the recent past. Popular prompts and long conversations come back after many other requests, so access frequency matters more for them. The first pattern suits LRU well; the second suits frequency-based policies.
Where LRU wins and where it loses
vLLM uses LRU by default. The authors compared it with the frequency-oriented S3FIFO and found a pattern that breaks the habit of picking one policy for good:
- on mixes dominated by agentic requests, LRU gets 12% more cache hits than S3FIFO;
- on the other mixes, LRU trails S3FIFO by up to 22%;
- even a single workload parameter can change the winner within the same mix.
The last point is the most unpleasant for engineers. You cannot measure traffic once, pick a policy, and forget about it. It takes only one parameter shifting for yesterday's leader to end up at the back of the pack.
What WAKMan does
WAKMan chooses an eviction policy based on live traffic. It does not need to know which requests are arriving, and it does not need to read the prompts themselves. For production, this is an important condition: request content is often sensitive, especially in an organization like a financial company, where the internship took place. The manager only needs to observe how traffic behaves.
WAKMan's results:
- an average hit rate gain of 5 percentage points over LRU;
- the lowest average gap to the optimal policy among all compared approaches;
- the lowest worst-case gap to the optimum among all compared approaches;
- tested on 20 mixes of single-turn, multi-turn, and agentic workloads.
The second and third points matter more than the average gain. They speak to predictability: WAKMan does not necessarily win on every individual mix, but it misses the best option less often and by a smaller margin. For an inference operator, that is worth more than one impressive win on a specific benchmark.
What teams with a growing share of agents should do
Agentic scenarios are quickly taking up a larger part of traffic. The cache profile changes with them: short "hot" returns become more frequent, while popular prompts and long conversations remain in the background. If the eviction policy is hard-coded into the server and never revisited, part of the benefit of prefix caching is lost. It is lost in the form of repeated prefill, that is, wasted GPU-seconds and added latency.
Practical takeaways for those running their own inference on vLLM:
- measure hit rate separately by workload type, not just as a server-wide average;
- do not treat LRU as an unconditionally safe choice: on some mixes it loses to S3FIFO by up to 22%;
- re-check the policy whenever the share of agentic traffic changes;
- judge solutions by the worst case, not just by the average gain.
WAKMan shows that policy selection can be automated without access to request content. For large deployments, a 5-percentage-point hit rate gain means less recomputation on every prefix and steadier latency under mixed traffic.
- Oct 29, 2026Modal Passes $1B ARR and Hits a $16B Valuation on Demand for Sandboxes
- Oct 29, 2026Ai2 shows LLM novelty judges break on a few words in the prompt
- Oct 29, 2026Sonnet 4.6 with Sourcegraph MCP Server Beats Fable 5: 0.698 vs 0.568
- Oct 29, 2026Stale Facts in Agent Memory Drop Qwen2.5 Accuracy from 100% to 44.6%
Key Questions Answered
Why agents and chatbots want different things from the cache?
Prefix caching lets a server reuse Key-Value states for requests that share a prefix with earlier prompts. This speeds up the prefill stage and lowers latency and serving cost. But real production traffic is mixed: single requests, multi-turn conversations, agent chains, or any blend of them. These request types have different "return times" to a prefix. Agent steps come back within a few seconds, so they need a cache that remembers the recent past. Popular prompts and long conversations come back after many other requests, so access frequency matters more for them. The fir
Where LRU wins and where it loses?
vLLM uses LRU by default. The authors compared it with the frequency-oriented S3FIFO and found a pattern that breaks the habit of picking one policy for good: on mixes dominated by agentic requests, LRU gets 12% more cache hits than S3FIFO; on the other mixes, LRU trails S3FIFO by up to 22%; even a single workload parameter can change the winner within the same mix. The last point is the most unpleasant for engineers. You cannot measure traffic once, pick a policy, and forget about it. It takes only one parameter shifting for yesterday's leader to end up at the back of the
What WAKMan does?
WAKMan chooses an eviction policy based on live traffic. It does not need to know which requests are arriving, and it does not need to read the prompts themselves. For production, this is an important condition: request content is often sensitive, especially in an organization like a financial company, where the internship took place. The manager only needs to observe how traffic behaves. WAKMan's results: an average hit rate gain of 5 percentage points over LRU; the lowest average gap to the optimal policy among all compared approaches; the lowest worst-case gap to the opt
Build & Ship Production AI Agents Without Boilerplate Code
Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.