Exact Replay and Random-Phase Analysis of Block-Level Prefix-Tree LRU Caches for LLM Serving

Large language model prefix-cache sizing needs hit-rate curves, but flat replay scans every block reference and Che-type approximations collapse tree-structured competition into one eviction horizon. Under atomic root-path refresh, a previously touched block's stack rank is its depth plus the number of distinct incomparable blocks touched since last use, so heavy-light decomposition yields exact all-capacity curves in one pass, 100–157× (FreeInference) and 5.4–6.9× (Qwen-Bailian) faster end to end than flat Mattson scanning. From per-chain templates (paths and offsets), exact evaluation under independent uniform phases is #P-hard for branching templates but polynomial-time for single-ray ones (one root-to-leaf ray per chain), using high-degree polynomials. Tree-CGF instead inverts the cumulant generating function numerically, at fixed-grid cost independent of disjoint replica count. At matched accuracy it overtakes random-phase replay at tested counts from 128 replicas on one FreeInference template, running about 9× faster at 512. Qwen coder needs a finer grid whose reuse decides the advantage. Tree-CGF estimates rare request-level miss probabilities (within 1.5× of polynomial integration on 6 qualifying private-block observations, where equal-time replay never comes within 2×), and its sliding-TTL envelopes cover all 240 observed drops. On 28 held-out FreeInference windows, Tree-CGF averages 1.90 percentage points (pp) curve error against observed-order replay, versus 7.97 for Che. Across 42 production units, mean absolute curve shifts for independent phases, single-ray projection and numerical solution are 1.77, 0.08 and 0.02 pp, favoring observed timing for co-location (Shifted-HLD: 0.506 versus Tree-CGF's 1.185 pp on 14 held-out two-model days) and Tree-CGF for template-only, high-multiplicity, or rare-tail questions.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-01
DOI
https://doi.org/10.5281/zenodo.24712804
Primary Topic
Caching and Content Delivery
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Exact Replay and Random-Phase Analysis of Block-Level Prefix-Tree LRU Caches for LLM Serving

Kaining Ding
Zenodo (CERN European Organization for Nuclear Research)
Caching and Content Delivery
preprint

Exact Replay and Random-Phase Analysis of Block-Level Prefix-Tree LRU Caches for LLM Serving

Kaining Ding
preprint en

Abstract

Large language model prefix-cache sizing needs hit-rate curves, but flat replay scans every block reference and Che-type approximations collapse tree-structured competition into one eviction horizon. Under atomic root-path refresh, a previously touched block's stack rank is its depth plus the number of distinct incomparable blocks touched since last use, so heavy-light decomposition yields exact all-capacity curves in one pass, 100–157× (FreeInference) and 5.4–6.9× (Qwen-Bailian) faster end to end than flat Mattson scanning. From per-chain templates (paths and offsets), exact evaluation under independent uniform phases is #P-hard for branching templates but polynomial-time for single-ray ones (one root-to-leaf ray per chain), using high-degree polynomials. Tree-CGF instead inverts the cumulant generating function numerically, at fixed-grid cost independent of disjoint replica count. At matched accuracy it overtakes random-phase replay at tested counts from 128 replicas on one FreeInference template, running about 9× faster at 512. Qwen coder needs a finer grid whose reuse decides the advantage. Tree-CGF estimates rare request-level miss probabilities (within 1.5× of polynomial integration on 6 qualifying private-block observations, where equal-time replay never comes within 2×), and its sliding-TTL envelopes cover all 240 observed drops. On 28 held-out FreeInference windows, Tree-CGF averages 1.90 percentage points (pp) curve error against observed-order replay, versus 7.97 for Che. Across 42 production units, mean absolute curve shifts for independent phases, single-ray projection and numerical solution are 1.77, 0.08 and 0.02 pp, favoring observed timing for co-location (Shifted-HLD: 0.506 versus Tree-CGF's 1.185 pp on 14 held-out two-model days) and Tree-CGF for template-only, high-multiplicity, or rare-tail questions.

Zenodo (CERN European Organization for Nuclear Research)
University of Oulu (FI)
Caching and Content Delivery
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Exact Replay and Random-Phase Analysis of Block-Level Prefix-Tree LRU Caches for LLM Serving — Kaining Ding · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS