Program Context Specific Buffer Caching with AMP

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%.

[1]  B. Gopinath,et al.  An inter-reference gap model for temporal locality in program behavior , 1995, SIGMETRICS '95/PERFORMANCE '95.

[2]  David J. DeWitt,et al.  An evaluation of buffer management strategies for relational database systems , 1986, Algorithmica.

[3]  Michael Stonebraker,et al.  Operating system support for database management , 1981, CACM.

[4]  John A. Kunze,et al.  A trace-driven analysis of the UNIX 4.2 BSD file system , 1985, SOSP '85.

[5]  Nimrod Megiddo,et al.  Outperforming LRU with an adaptive replacement cache algorithm , 2004, Computer.

[6]  Mary Baker,et al.  Measurements of a distributed file system , 1991, SOSP '91.

[7]  Christos Faloutsos,et al.  Flexible and Adaptable Buffer Management Techniques for Database Management Systems , 1995, IEEE Trans. Computers.

[8]  Dharmendra S. Modha,et al.  CAR: Clock with Adaptive Replacement , 2004, FAST.

[9]  Gerhard Weikum,et al.  The LRU-K page replacement algorithm for database disk buffering , 1993, SIGMOD Conference.

[10]  Kai Li,et al.  Application-Controlled File Caching Policies , 1994, USENIX Summer.

[11]  Peter J. Denning,et al.  Operating Systems Theory , 1973 .

[12]  Jim Zelenka,et al.  Informed prefetching and caching , 1995, SOSP.

[13]  Harold S. Stone,et al.  Improving Disk Cache Hit-Ratios Through Cache Partitioning , 1992, IEEE Trans. Computers.

[14]  Y. Charlie Hu,et al.  Program-Counter-Based Pattern Classification in Buffer Caching , 2004, OSDI.

[15]  Sang Lyul Min,et al.  LRFU (Least Recently/Frequently Used) Replacement Policy: A Spectrum of Block Replacement Policies , 1996 .

[16]  David R. Cheriton,et al.  Application-controlled physical memory using external page-cache management , 1992, ASPLOS V.

[17]  Dennis Shasha,et al.  2Q: A Low Overhead High Performance Buffer Management Replacement Algorithm , 1994, VLDB.

[18]  Jim Gray,et al.  Benchmark Handbook: For Database and Transaction Processing Systems , 1992 .

[19]  Sang Lyul Min,et al.  A low-overhead high-performance unified buffer management scheme that exploits sequential and looping references , 2000, OSDI.

[20]  Daniel Pierre Bovet,et al.  Understanding the Linux Kernel , 2000 .

[21]  George C. Necula,et al.  Capriccio: scalable threads for internet services , 2003, SOSP '03.

[22]  Sang Lyul Min,et al.  An Implementation Study of a Detection-Based Adaptive Block Replacement Scheme , 1999, USENIX Annual Technical Conference, General Track.