An optimality proof of the LRU-K page replacement algorithm

This paper analyzes a recently published algorithm for page replacement in hierarchical paged memory systems [O'Neil et al. 1993]. The algorithm is called the LRU-<italic>K</italic> method, and reduces to the well-known LRU (Least Recently Used) method for <italic>K</italic> = 1. Previous work [O'Neil et al. 1993; Weikum et al. 1994; Johnson and Shasha 1994] has shown the effectiveness for <italic>K</italic> > 1 by simulation, especially in the most common case of <italic>K</italic> = 2. The basic idea in LRU-<italic>K</italic> is to keep track of the times of the last <italic>K</italic> references to memory pages, and to use this statistical information to rank-order the pages as to their expected future behavior. Based on this the page replacement policy decision is made: which memory-resident page to replace when a newly accessed page must be read into memory. In the current paper, we prove, under the assumptions of the independent reference model, that LRU-<italic>K</italic> is optimal. Specifically we show: given the times of the (up to) <italic>K</italic> most recent references to each disk page, no other algorithm <italic>A</italic> making decisions to keep pages in a memory buffer holding <italic>n</italic> - 1 pages based on this infomation can improve on the expected number of I/Os to access pages over the LRU-<italic>K</italic> algorithm using a memory buffer holding <italic>n</italic> pages. The proof uses the Bayesian formula to relate the space of actual page probabilities of the model to the space of observable page numbers on which the replacement decision is acutally made.

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

[2]  WeikumGerhard,et al.  The COMFORT automatic tuning project , 1994 .

[3]  Forest L. Miller Basic Concepts of Probability and Statistics , 1973 .

[4]  Christos H. Papadimitriou,et al.  Beyond competitive analysis [on-line algorithms] , 1994, Proceedings 35th Annual Symposium on Foundations of Computer Science.

[5]  Dennis Shasha,et al.  2Q: A low overhead high performance buffer replacement algorithm , 1994 .

[6]  Peter J. Denning,et al.  The working set model for program behavior , 1968, CACM.

[7]  Jim Gray,et al.  The 5 minute rule for trading memory for disc accesses and the 10 byte rule for trading memory for CPU time , 1987, SIGMOD '87.

[8]  D. Berry,et al.  Statistics: Theory and Methods , 1990 .

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

[10]  Alfred V. Aho,et al.  Principles of Optimal Page Replacement , 1971, J. ACM.

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

[12]  Laszlo A. Belady,et al.  A Study of Replacement Algorithms for Virtual-Storage Computer , 1966, IBM Syst. J..

[13]  E. L. Lehmann,et al.  Basic Concepts of Probability and Statistics , 1964 .

[14]  J. L. Hodges,et al.  Basic Concepts of Probability and Statistics, Second Edition. , 1970 .

[15]  Robert E. Tarjan,et al.  Amortized efficiency of list update and paging rules , 1985, CACM.

[16]  Wolfgang Effelsberg,et al.  Principles of database buffer management , 1984, TODS.

[17]  Gerhard Weikum,et al.  The COMFORT Automatic Tuning Project, Invited Project Review , 1994, Inf. Syst..