SARIA: Persistence-Aware KV Caching with Coordinated DRAM--SSD Reload for LLM Agents
Hui Li, Qihui Zhou, Xiao Yan, Shumeng Zhang, Zijie Dai, Zequn Gong, Mingcong Song, Guoping Long, Hongjie Si, James Cheng
Abstract
Multi-turn LLM agents usually reuse long context prefixes, making key value (KV) caching crucial for reducing prefill latency. SSDs provide a low-cost extension to limited DRAM capacity but introduce two key challenges. Eagerly persisting all KV cache blocks incurs substantial write traffic and rapidly consumes finite SSD endurance. Meanwhile, the small number of SSDs provisioned in typical GPU servers limits aggregate reload bandwidth, making SSD-resident KV cache much slower to retrieve than that in DRAM and inflating prefill latency. We present Saria (Selective Admission and Reload for Inference Acceleration), a KV caching system that jointly manages DRAM and SSD by exploiting the session-level temporal locality of LLM agents to reduce SSD writes and accelerate cache reload. On the write path, Saria uses eviction and reuse history to selectively persist KV cache blocks that exhibit reuse opportunities beyond their DRAM residency, avoiding unnecessary writes for KV cache already hosted in DRAM. On the read path, Saria promotes selected SSD-hit KV cache blocks from GPU memory into DRAM after prefill, allowing subsequent reuse within the same session to reduce SSD read traffic while limiting DRAM contention. A transfer coordinator paces DRAM reads while SSD transfers are active, allowing both paths to make progress and efficiently share GPU ingress bandwidth. We implement Saria on LMCache MP and evaluate it using workloads from TraceLab and WEKA, covering both full-attention and hybrid-attention models. The results show that Saria reduces SSD writes by 57.1--58.9\% compared with popular full duplicate caching and the mean time to first token (TTFT) by 42.3--79.7\% over DRAM-only caching.
Create a lesson
Metadata
- Comments
- 12 pages, 16 figures
Related papers
EngineAgent: Agentizing On-Device LLM Inference Engines with Inference Stack Hierarchy Awareness and Hardware Abilities
Shared title terminologycs.OSZhengxiang Huang, Yujie Sun, Shengheng Chen et al.
MORTIS: Compiler-Guided KV-Cache Management for LLM Agent Programs
Shared title terminologycs.OSXiaoyu Ma, Jayanaka L. Dantanarayana, Savini Kashmira et al.
AgentLens: Framework-Aware Characterization and Resource Control for Heterogeneous LLM Agents
Shared title terminologycs.OSWentao Hong
Capture the lifecycle: KV Cache management in ReAct Agents with KVTether
Shared title terminologycs.OSKaihua Fu, Yukun Zhou, Chaokun Chang et al.
ActKV: Efficient LLM Agents through Action-Guided KV Cache Management
Shared title terminologycs.OSZihan Wang, Cheng Tang, Lei Gong et al.
MobiInfer: Accelerating On-Device GUI Agents with Workload-Aware Inference
Shared title terminologycs.OSSiming Chen, Erhu Feng, Dahu Feng et al.