SR-Gadgets: Make Scan-Resistant Caching Practical
Yunjia Zheng, Juncheng Yang
Key points
From the paper's conclusion- We implement the \gadgetprefix Gadgets in five algorithms: S3-FIFO, SIEVE, ARC, 2Q, and TinyLFU, and make them scan-resistant.
Abstract
Block caches commonly serve scan-heavy I/O workloads, motivating extensive studies on scan-resistant eviction algorithms. Many of these algorithms adopt a multi-queue structure. However, they focus primarily on one-time scans and do not handle repeated scans well. Two important challenges from repeated scans are miss-ratio cliffs, where a small increase in cache size sharply reduces the miss ratio, and Belady's anomalies, where increasing the cache size increases the miss ratio. In this paper, we first develop two quantitative metrics to measure these behaviors. With these metrics, we find that LIRS is the only multi-queue algorithm that is scan-resistant (almost cliff- and anomaly-free). Contrary to conventional wisdom, we show that stack distance is not the secret sauce that makes LIRS scan-resistant. Instead, regulating the queues are the key to its scan resistance. Based on these insights, we design the \gadgetprefix Gadgets, easy-to-integrate augmentations that make existing algorithms scan-resistant without changing their eviction heuristics or queue structures. We implement the \gadgetprefix Gadgets in five algorithms: S3-FIFO, SIEVE, ARC, 2Q, and TinyLFU, and make them scan-resistant. Evaluated on 5,538 production traces, all augmented algorithms outperform their base versions, reducing miss ratios by up to 23.1% while consistently reducing cliffs and Belady's anomalies across the production traces.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Performance Analysis of the Randomized SIEVE/CLOCK Cache Replacement AlgorithmProceedings of the ACM on Measurement and Analysis of Computing Systems · 2026
- OR-LSM: Optimizing Read Performance for LSM-KVS via Adaptive Caching Management and Scan Mode SelectionACM Transactions on Architecture and Code Optimization · 2026
- PCR: A Prefetch-Enhanced Cache Reuse System for Low-Latency RAG ServingACM Transactions on Architecture and Code Optimization · 2026
- Caching Policies based on Object SizesarXiv · 2026
- Characterizing Predictability-Latency Trade-offs of KV-Cache SSD Offloading in LMCache for LLM Serving SystemsarXiv · 2026
- No-Regret Mixing of LRU and LFU with Optimal Switching CostarXiv · 2026