[Summary] Prompt Caching on Flash: Achieving Memory-Class Latency for LLM Inference
Key Concepts and System Design
Prompt caching accelerates LLM inference by retaining previously generated key-value (KV) states and reusing them for matching prefixes. However, the reusable working set can exceed available GPU memory and host DRAM as conversations accumulate. SSDs provide a larger, less expensive storage tier, but their effectiveness depends on how efficiently cached data can be transferred to the GPU.
This study examines the SSD retrieval path in a hierarchical prompt cache. Its central observation is that prefix reuse changes the dominant prefill bottleneck. When cached KV states replace most computation, data transfer becomes a major contributor to Time-To-First-Token (TTFT). Consequently, storage bandwidth utilization becomes essential to realizing the latency benefits of prompt caching.
The design addresses two sources of parallelism. Within each SSD, asynchronous requests, larger I/O blocks, deeper queues, and multiple issuing threads distribute work across flash channels, dies, and planes. The implementation extends LMCache’s single-threaded POSIX read path with Linux io_uring. The selected configuration uses 1 MB blocks, an I/O depth of 16, and eight issuing threads. It also increases file granularity to approximately 160 MB, corresponding to 1K tokens of KV data, while retaining 256-token cache-hit lookup granularity.
Across devices, KV data are interleaved over multiple NVMe SSDs. Four SSDs, each connected through a PCIe x4 link, provide sufficient aggregate bandwidth to approach the transfer capability of the H100’s PCIe Gen5 x16 interface. Combining internal and external parallelism reduces the storage bottleneck along the retrieval path.
Performance Evaluation
Experiments use Qwen3-14B on a single NVIDIA H100 PCIe GPU, with LMCache v0.3.1 integrated into vLLM v0.9.1. The evaluation includes a microbenchmark with complete prefix reuse and a ShareGPT-based workload with mixed cache hits.
The ShareGPT comparison assigns equal cache capacity to DRAM and SSD to isolate retrieval performance. These results show that coordinated I/O tuning and device scaling can make SSD-backed prompt caching perform similarly to DRAM-backed caching within the tested operating range.
|
Evaluation |
Main Result |
|
Multi-SSD scaling |
Increasing the SSD count from one to four reduces TTFT by 42%. |
|
Additional I/O optimization |
The fully optimized configuration reduces TTFT by another 45% relative to the four-SSD configuration using external parallelism alone. |
|
ShareGPT workload |
At 0.1–0.5 queries per second, SSD-backed caching achieves TTFT of 0.97–1.05× the DRAM baseline. |
The study also evaluates endurance using the Qwen-Bailian trace. For Qwen3-14B, the estimated write volume is approximately 57.5 TB per GPU per day. With four SSDs, the minimum capacity required per drive is approximately 0.29 TB at 50 Drive Writes Per Day (DWPD), 14.4 TB at 1 DWPD, and 28.8 TB at 0.5 DWPD.
Reducing write amplification can lower these capacity requirements. The analysis shows that increasing over-provisioning can reduce the TLC requirement from 14.4 TB to 4.8 TB per drive. A separate Zoned Namespace example reduces the QLC requirement to approximately 8.8 TB per drive.
Conclusion
SSDs can support prompt caching with TTFT close to host DRAM when the serving system exposes enough parallel I/O and combines sufficient device bandwidth. The findings demonstrate that retrieval latency depends strongly on storage access patterns and system configuration.
Deployment still requires attention to endurance, PCIe connectivity, and latency variability. Even after optimization, SSD requests exhibit less consistent completion times than DRAM retrieval. Platforms with substantially faster CPU–GPU links, such as GH200, also create a larger bandwidth gap for PCIe-attached storage. Future opportunities include KV-aware storage interfaces, improved hardware/software coordination, and heterogeneous cache hierarchies that combine memory and flash according to workload requirements.
DOI: https://doi.org/10.1109/LCA.2026.3711675



