Effective KV cache management in distributed LLM systems is critical for mitigating High Bandwidth Memory (HBM) saturation caused by expanding context lengths and high concurrency. To optimize inference throughput, systems must coordinate the movement of key and value tensors across a tiered hierarchy: GPU HBM (hot), Host DRAM (warm), NVMe (cold), and remote memory via RDMA/InfiniBand. The memory footprint is mathematically defined by the number of layers, attention heads, sequence length, and batch size, where Grouped-Query Attention (GQA) can reduce memory usage by a factor of the group size $G$ compared to Multi-Head Attention. Modern architectures utilize paged memory management to decouple logical token sequences from non-contiguous physical blocks, reducing fragmentation. Decision logic for block placement relies on comparing the cost of recomputation against transfer latency: migration is preferred only if $T_{\text{transfer}} < T_{\text{recompute}}$. Advanced eviction strategies have moved beyond simple LRU to include radix-tree reference counting for prefix reuse and recomputation-cost-aware heuristics. In disaggregated architectures, GPUDirect RDMA is employed to enable kernel-bypass transfers between prefill and decode nodes, minimizing latency while maintaining strict Service Level Objectives for Inter-Token Latency (ITL).

Read original