We present Adaptive Multi-Policy buffer caching (AMP), which uses multiple caching policies within one application, and adapts both which policies to use and their relative fraction of the cache. AMP differentiates disk requests based on the program contexts that issue them, and detects access pattern for each program context. This approach leads to detected patterns more stable than previous approaches that do detection based on processes and files. Compared to recent work, AMP is unique in that it employs a novel robust scheme for detecting looping patterns in access streams, as well as a low-overhead randomized way of managing many cache partitions. We show that AMP outperforms non-detection-based caching algorithms on a variety of workloads. For example, AMP reduces cache miss rate by up to 50% on a large database workloads. Other applications show about 20%-30% reduction in cache miss rate. Compared to other detection-based schemes, AMP detects access patterns more accurately in our experiment with a series of synthesized workloads, and incurs up to 15% fewer misses for one of the application traces. Experience with a Linux implementation is reported. Our prototype shortens the run time of a large database workload by 9.6%.




Download Full History