Saved in:
Bibliographic Details
Main Authors: Zhang, Wenxin, Li, Yueying, Moallemi, Ciamac C., Peng, Tianyi
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2510.15152
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918162415484928
author Zhang, Wenxin
Li, Yueying
Moallemi, Ciamac C.
Peng, Tianyi
author_facet Zhang, Wenxin
Li, Yueying
Moallemi, Ciamac C.
Peng, Tianyi
contents Prompt caching is critical for reducing latency and cost in LLM inference: OpenAI and Anthropic report up to 50-90% cost savings through prompt reuse. Despite its widespread success, little is known about what constitutes an optimal prompt caching policy, particularly when optimizing tail latency, a metric of central importance to practitioners. The widely used Least Recently Used (LRU) policy can perform arbitrarily poor on this metric, as it is oblivious to the heterogeneity of conversation lengths. To address this gap, we propose Tail-Optimized LRU, a simple two-line modification that reallocates KV cache capacity to prioritize high-latency conversations by evicting cache entries that are unlikely to affect future turns. Though the implementation is simple, we prove its optimality under a natural stochastic model of conversation dynamics, providing the first theoretical justification for LRU in this setting, a result that may be of independent interest to the caching community. Experimentally, on real conversation data WildChat, Tail-Optimized LRU achieves up to 27.5% reduction in P90 tail Time to First Token latency and 23.9% in P95 tail latency compared to LRU, along with up to 38.9% decrease in SLO violations of 200ms. We believe this provides a practical and theoretically grounded option for practitioners seeking to optimize tail latency in real-world LLM deployments.
format Preprint
id arxiv_https___arxiv_org_abs_2510_15152
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Tail-Optimized Caching for LLM Inference
Zhang, Wenxin
Li, Yueying
Moallemi, Ciamac C.
Peng, Tianyi
Systems and Control
Prompt caching is critical for reducing latency and cost in LLM inference: OpenAI and Anthropic report up to 50-90% cost savings through prompt reuse. Despite its widespread success, little is known about what constitutes an optimal prompt caching policy, particularly when optimizing tail latency, a metric of central importance to practitioners. The widely used Least Recently Used (LRU) policy can perform arbitrarily poor on this metric, as it is oblivious to the heterogeneity of conversation lengths. To address this gap, we propose Tail-Optimized LRU, a simple two-line modification that reallocates KV cache capacity to prioritize high-latency conversations by evicting cache entries that are unlikely to affect future turns. Though the implementation is simple, we prove its optimality under a natural stochastic model of conversation dynamics, providing the first theoretical justification for LRU in this setting, a result that may be of independent interest to the caching community. Experimentally, on real conversation data WildChat, Tail-Optimized LRU achieves up to 27.5% reduction in P90 tail Time to First Token latency and 23.9% in P95 tail latency compared to LRU, along with up to 38.9% decrease in SLO violations of 200ms. We believe this provides a practical and theoretically grounded option for practitioners seeking to optimize tail latency in real-world LLM deployments.
title Tail-Optimized Caching for LLM Inference
topic Systems and Control
url https://arxiv.org/abs/2510.15152