Rethinking KV Cache Eviction for Agentic LLM Serving
Jiakun Fan, Han Meng, Yuxuan Xia, Hao Mark Chen, Dong Li, Dimitrios S. Nikolopoulos
Abstract
Key-value (KV) caches impose substantial memory pressure on large language model serving systems, requiring cache eviction when capacity is insufficient. Existing mechanisms typically evict KV from the ends of cached sequences to preserve prefix sharing across requests. However, agent workloads repeatedly reuse long histories across successive turns. Recomputing the KV cache for tokens near the end of a sequence is substantially more expensive than for earlier tokens because their attention computation involves longer histories. To address this problem, we propose preserving shared prefixes and evicting the KV cache from the beginning of the remaining history while retaining the cached suffix. We build Penelope around this strategy by co-designing the eviction policy, KV recomputation, and unified GPU-CPU cache management. Returning requests reuse the KV cache retained in GPU or CPU memory and recompute only missing segments while preserving reuse of the cached suffix. We implement Penelope in SGLang and evaluate it on three Qwen3 model sizes using real agent traces. Compared with SGLang, Penelope reduces mean time to first token by up to 60% and job completion time by up to 37% with a GPU-only cache, and by up to 76% and 60% with a two-tier GPU-CPU cache.
Create a lesson
Related papers
Contexture: Runtime Context Eviction for High-Throughput Agent Serving
Shared title terminology · Colin Hong, Bryan Shan, Wei Siong Pang et al.
Bursts That Outlast Themselves: Persistent Degradation in Prefix-Cached Agent Serving
Shared title terminology · Wen Huang, Jack Liu
Inside the Trap: A Renewal Law for Prefix-Cache Collapse in LLM Agent Serving
Shared title terminology · Akshat Valse, Ali Jannesari
When Cache Pressure Becomes a Trap: Metastability in Agent Serving
Shared title terminology · Chengzhi Lu, Boxi Zhou, Yanying Lin et al.
HiState: Hierarchical Prefix Cache Management for Hybrid LLM Serving in Agentic Workloads
Shared title terminology · Zaifeng Pan, Lucas Wang, Xinwei Qiang et al.
TideCache: Efficient Hybrid LLM Serving with Transparent Cache Management and Layer-Wise Streaming
Shared title terminology · Jinbin Luo, Xiaozhe Yao, Shang Yang et al.