Exact Replay and Random-Phase Analysis of Block-Level Prefix-Tree LRU Caches for LLM Serving
Year: 2026
Type: preprint
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.
Author: Ding, Kaining
Institution: University of Oulu
Language: English
Topic: Caching and Content Delivery
Subfield: Computer Networks and Communications
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7242008153
Cites:
Cited by:
Related to:
