This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Making LRU Friendly to Weak Locality Workloads: A Novel Replacement Algorithm to Improve Buffer Cache Performance
August 2005 (vol. 54 no. 8)
pp. 939-952
Although the LRU replacement algorithm has been widely used in buffer cache management, it is well-known for its inability to cope with access patterns with weak locality. Previously proposed algorithms to improve LRU greatly increase complexity and/or cannot provide consistently improved performance. Some of the algorithms only address LRU problems on certain specific and predefined cases. Motivated by the limitations of existing algorithms, we propose a general and efficient replacement algorithm, called Low Inter-reference Recency Set (LIRS). LIRS effectively addresses the limitations of LRU by using recency to evaluate Inter-Reference Recency (IRR) of accessed blocks for making a replacement decision. This is in contrast to what LRU does: directly using recency to predict the next reference time. Meanwhile, LIRS mostly retains the simple assumption adopted by LRU for predicting future block access behaviors. Conducting simulations with a variety of traces of different access patterns and with a wide range of cache sizes, we show that LIRS significantly outperforms LRU and outperforms other existing replacement algorithms in most cases. Furthermore, we show that the additional cost for implementing LIRS is trivial in comparison with that of LRU. We also show that the LIRS algorithm can be extended into a family of replacement algorithms, in which LRU is a special member.

[1] L.A. Belady, R.A. Nelson, and G.S. Shedler, “An Anomaly in Space-Time Characteristics of Certain Programs Running in a Paging Machine,” Comm. ACM, vol. 12, pp. 349-353, 1969.
[2] E.G. Coffman and P.J. Denning, Operating Systems Theory. Prentice-Hall, 1973.
[3] P. Cao, E.W. Felten, and K. Li, “Application-Controlled File Caching Policies,” Proc. USENIX Summer 1994 Technical Conf., pp. 171-182, June 1994.
[4] J. Choi, S. Noh, S. Min, and Y. Cho, “Towards Application/File-Level Characterization of Block References: A Case for Fine-Grained Buffer Management,” Proc. 2000 ACM SIGMETRICS Conf. Measuring and Modeling of Computer Systems, pp. 286-295, June 2000.
[5] J. Choi, S. Noh, S. Min, and Y. Cho, “An Implementation Study of a Detection-Based Adaptive Block Replacement Scheme,” Proc. 1999 Ann. USENIX Technical Conf., pp. 239-252, June 1999.
[6] C. Ding and Y. Zhong, “Predicting Whole-Program Locality through Reuse-Distance Analysis,” Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 245-257, June 2003.
[7] W. Effelsberg and T. Haerder, “Principles of Database Buffer Management,” ACM Trans. Database Systems, pp. 560-595, Dec. 1984.
[8] C. Gniady, A.R. Butt, and Y.C. Hu, “Program Counter Based Pattern Classification in Buffer Caching,” Proc. Sixth Symp. Operating Systems Design and Implementation, pp. 395-408, Dec. 2004.
[9] G. Glass and P. Cao, “Adaptive Page Replacement Based on Memory Reference Behavior,” Proc. 1997 ACM SIGMETRICS Conf. Measuring and Modeling of Computer Systems, pp. 115-126, May 1997.
[10] T. Johnson and D. Shasha, “2Q: A Low Overhead High Performance Buffer Management Replacement Algorithm,” Proc. 20th Int'l Conf. Very Large Data Bases, pp. 439-450, Sept. 1994.
[11] S. Jiang and X. Zhang, “LIRS: An Efficient Low Inter-Reference Recency Set Replacement Policy to Improve Buffer Cache Performance,” Proc. 2002 ACM SIGMETRICS Conf. Measuring and Modeling of Computer Systems, pp. 31-42, June 2002.
[12] S. Jiang, F. Chen, and X. Zhang, “CLOCK-Pro: An Effective Improvement of the CLOCK Replacement,” Proc. 2005 Ann. USENIX Technical Conf., pp. 323-336, Apr. 2005.
[13] J. Kim, J. Choi, J. Kim, S. Noh, S. Min, Y. Cho, and C. Kim, “A Low-Overhead, High-Performance Unified Buffer Management Scheme that Exploits Sequential and Looping References,” Proc. Fourth Symp. Operating System Design and Implementation, pp. 119-134, Oct. 2000.
[14] D. Lee, J. Choi, J. Kim, S. Noh, S. Min, Y. Cho, and C. Kim, “On the Existence of a Spectrum of Policies that Subsumes the Least Recently Used (LRU) and Least Frequently Used (LFU) Policies,” Proc. 1999 ACM SIGMETRICS Conf. Measuring and Modeling of Computer Systems, pp. 134-143, May 1999.
[15] T.C. Mowry, A.K. Demke, and O. Krieger, “Automatic Compiler-Inserted I/O Prefetching for Out-of-Core Application,” Proc. Second USENIX Symp. Operating Systems Design and Implementation, pp. 3-17, Oct. 1996.
[16] N. Megiddo and D. Modha, “ARC: A Self-Tuning, Low Overhead Replacement Cache,” Proc. Second USENIX Conf. File and Storage Technologies, pp. 115-130, Mar. 2003.
[17] E.J. O'Neil, P.E. O'Neil, and G. Weikum, “The LRU-K Page Replacement Algorithm for Database Disk Buffering,” Proc. 1993 ACM SIGMOD Int'l Conf. Management of Data, pp. 297-306, May 1993.
[18] V. Phalke and B. Gopinath, “An Inter-Reference Gap Model for Temporal Locality in Program Behavior,” Proc. 1995 ACM SIGMETRICS Conf. Measuring and Modeling of Computer Systems, pp. 291-300, May 1995.
[19] R.H. Patterson, G.A. Gibson, E. Ginting, D. Stodolsky, and J. Zelenka, “Informed Prefetching and Caching,” Proc. 15th Symp. Operating System Principles, pp. 1-16, Dec. 1995.
[20] J.T. Robinson and N.V. Devarakonda, “Data Cache Management Using Frequency-Based Replacement,” Proc. 1990 ACM SIGMETRICS Conf. Measuring and Modeling of Computer Systems, pp. 134-142, May 1990.
[21] C. Ruemmler and J. Wilkes, “UNIX Disk Access Patterns,” Proc. Usenix Winter 1993 Technical Conf., pp. 405-420, Jan. 1993.
[22] Y. Smaragdakis, S. Kaplan, and P. Wilson, “EELRU: Simple and Effective Adaptive Page Replacement,” Proc. 1999 ACM SIGMETRICS Conf. Measuring and Modeling of Computer Systems, pp. 122-133, May 1999.
[23] Y. Zhou, J.F. Philbin, and K. Li, “The Multi-Queue Replacement Algorithm for Second Level Buffer Caches,” Proc. 2001 Ann. USENIX Technical Conf., pp. 91-104, June 2001.

Index Terms:
Index Terms- Operating systems, memory management, replacement algorithms.
Citation:
Song Jiang, Xiaodong Zhang, "Making LRU Friendly to Weak Locality Workloads: A Novel Replacement Algorithm to Improve Buffer Cache Performance," IEEE Transactions on Computers, vol. 54, no. 8, pp. 939-952, Aug. 2005, doi:10.1109/TC.2005.130
Usage of this product signifies your acceptance of the Terms of Use.