An Efficient Buffer Cache Management Algorithm based on Prefetching

선반입을 이용한 효율적인 버퍼 캐쉬 관리 알고리즘

  • Published : 2000.05.15

Abstract

This paper proposes a prefetch-based disk buffer management algorithm, which we call W2R (Veighingjwaiting Room). Instead of using elaborate prefetching schemes to decide which blockto prefetch and when, we simply follow the LRU-OBL (One Block Lookahead) approach and prefetchthe logical next block along with the block that is being referenced. The basic difference is that theW2R algorithm logically partitions the buffer into two rooms, namely, the Weighing Room and theWaiting Room. The referenced, hence fetched block is placed in the Weighing Room, while theprefetched logical next block is placed in the Waiting Room. By so doing, we alleviate some inherentdeficiencies of blindly prefetching the logical next block of a referenced block. Specifically, a prefetchedblock that is never used may replace a possibly valuable block and a prefetched block, thoughreferenced in the future, may replace a block that is used earlier than itself. We show through tracedriven simulation that for the workloads and the environments considered the W2R algorithm improvesthe hit rate by a maximum of 23.19 percentage points compared to the 2Q algorithm and a maximumof 10,25 percentage feints compared to the LRU-OBL algorithm.

본 논문은 선반입에 기반한 디스크 버퍼 관리 알고리즘인 $W^2R$ 알고리즘을 제안한다. $W^2R$알고리즘은 어떤 블록을, 언제 선반입할 것인가를 결정하기 위한 복잡한 선반입 정책 대신, LRU-OBL 알고리즘의 접근 방법을 따라 현재 참조되는 블록의 논리적 다음 블록을 선반입한다. LRU-OBL 알고리즘과의 기본적인 차이점은 $W^2R$ 알고리즘은 버퍼를 논리적으로 두개의 공간, 즉, Weighing Room과 Waiting Room으로 분할한다는 것이다. 참조되는 플록은 Weighing Room에 반입되고 선반입되는 논리적 다음 블록은 Waiting Room에 저장된다. 이렇게 함으로써, 무조건으로 참조되는 블록의 논리적 다음 블록을 선반입하는 LRU-OBL 정책의 단점을 해결한다. 구체적으로, 선반입되었으나 결코 참조되지 않을, 흑은 실제로 참조된다고 할지라도 교체될 블록보다 더 나중에 참조될 블록들을 위해 재 참조될 가능성이 있는 블록들 을 교체하는 문제점들을 해결한다. $W^2R$ 알고리즘은 트레이스 기반 시뮬레이션을 통해 버퍼 캐쉬 적중률을 측정한 결과 2Q 알고리즘에 비해서는 최고 23.19 %, LRU-OBL 알고리즘에 비해서는 최고 10.25 % 의 성능향상을 나타낸다.

Keywords

References

  1. Elizabeth J. O'Neil, Patrick E. O'Neil, and Gerhard Weikum. The LRU-K Page Replacement Algorithm For Database Disk Buffering. In Proceedings of the 1993 ACM SIGMOD International Conference on Management of Data, pages 297--306, May 1993 https://doi.org/10.1145/170035.170081
  2. Theodore Johnson and Dennis Shasha. 2Q: A Low Overhead High Performance Buffer Management Replacement Algorithm. In Proceedings of the 20th VLDB Conference, pages 439--450, 1994
  3. J. T. Robinson and N. V. Devarakonda. Data Cache Management Using Frequency-Based Replacement. In Proceedings of the 1990 ACM SIGMETRICS Conference, pages 134--142, 1990 https://doi.org/10.1145/98457.98523
  4. Alan Jay Smith. Sequential program prefetching in memory hierarchies. IEEE Computer, 3(3):7--21, December 1978
  5. Alan Jay Smith. Disk cache-miss ratio analysis and design considerations. ACM Transactions on Computer Systems, 3(3):161--203, August 1985 https://doi.org/10.1145/3959.3961
  6. Thomas M. Kroeger and Darrell D.E. Long. Predicting File System Actions from Prior Events. In 1996 Annual USENIX Technical Conference, October 1996
  7. Vidyadhar Phalke and Bhaskarpillai Gopinath. An Inter-Reference Gap Model for Temporal Locality in Program Behavior. In Proceedings of the Joint International Conference on Measurement and Modeling of Computer Systems (Sigmetrics '95/ Performance '95), pages 291--300, May 1995 https://doi.org/10.1145/223587.223620
  8. Pei Cao, Edward Felten, and Kai Li. Application-Controlled File Caching Policies. In Summer USENIX '94, pages 171--182, JUNE 1994
  9. Pei Cao and Edward W. Felton. Implementation and Performance of Integrated Application-Controlled File Caching, Prefetching, and Disk Scheduling. ACM Transactions on Computer Systems, 14(4):311--343, November 1996 https://doi.org/10.1145/235543.235544
  10. F. Chang and G. Gibson. Automatic I/O Hint Generation through Speculative Execution. In Proceedings of the 3rd Symposium on Operating Systems Design and Implementation, February 1999
  11. Jongmoo Choi, Sam H. Noh, Sang Lyul Min, and Yookun Cho. An Implementation Study of a Detection Based Adaptive Block Replacement Scheme. In Proceedings of the 1999 USENIX Technical Conference, pages 239--252, 1999
  12. R. Hugo Patterson, Garth A. Gibson, Eka Ginting, Daniel Stodolsky, and Jim Zelenka. Informed Prefetching and Caching. In Proceedings of the 15th Symposium on Operating Principles, pages 79--95, December 1995 https://doi.org/10.1145/224057.224064
  13. Ramakrishna Karedla and J.Spencer Love and Bradley G. Wherry. Caching Strategies to Improve Disk System Performance. Computer, 27(3):38--46, March 1994 https://doi.org/10.1109/2.268884
  14. Todd C. Mowry, Angela K. Demke, and Orran Krieger. Automatic Compiler-Inserted I/O Prefetching for Out-of-Core Applications. In USENIX 2nd Symposium on Operating Systems Design and Implementation, October 1996 https://doi.org/10.1145/238721.238734
  15. Mary G. Baker, John H. Hartman, Michael D. Kupfer, KenW. Shirriff, and John K. Ousterhout. Measurements of a Distributed File System. In Proceedings of the 13th Symposium on Operating System Principles, pages 198--212, Pacific Grove, CA, October 1991 https://doi.org/10.1145/121132.121164
  16. J. Ousterhout, A. Cherenson, F. Douglis, M. Nelson, and B. Welch. The Sprite Network Operating System. IEEE Computer, 21(2):23--36, February 1988 https://doi.org/10.1109/2.16