skip to main content
10.1145/3528114.3528118acmotherconferencesArticle/Chapter ViewAbstractPublication PagesdsdeConference Proceedingsconference-collections
research-article

Learned Buffer Replacement for Database Systems

Published: 24 June 2022 Publication History

Abstract

Most current database buffering schemes adopt an empirical design, which cannot adapt to the change of workloads. In this paper, we show how we can use machine learning to help design a new buffer replacement policy for database systems. We name the new policy LBR (Learned Buffer Replacement). The key idea of LBR is to use machine learning models to periodically learn the access pattern from historical requests to make the buffer replacement adaptive to the workload change. Particularly, we present two ways to learn the access pattern. One is a classifier named LBR-c, which can distinguish hot pages from cold ones based on the training on historical requests; the other is a regressor called LBR-r, which can predict the future replacement behavior according to historical accesses. We implement the proposed LBR-c and LBR-r and compare them to a number of existing schemes, including the theoretically optimal Belady's algorithm, three traditional algorithms (LRU, 2Q, and ARC), and LeCaR, which is a recently-proposed adaptive buffer scheme. The results show that our algorithms achieve a higher hit ratio than LRU, ARC, 2Q, and LeCaR. In addition, both LBR-c and LBR-r can adapt to workload changes, which is better than LRU, 2Q, ARC, and LeCaR. Overall, our proposal achieves comparable performance with the optimal buffer replacement algorithm, advancing the state-of-the-art in the well-studied area of buffer management in DBMSs.

References

[1]
Laszlo A. Belady. 1966. A Study of Replacement Algorithms for Virtual-Storage Computer. IBM System Journal 5, 2 (1966), 78–101.
[2]
Zhou Zhang, Peiquan Jin, Xiao-Liang Wang, Yan-Qi Lv, Shouhong Wan, Xike Xie. COLIN: A Cache-Conscious Dynamic Learned Index with High Read/Write Performance. Journal of Computer Science and Technology. 36, 4 (2021), 721-740.
[3]
Wolfgang Effelsberg and Theo Härder.1984.Principles of Database Buffer Management. ACM Transactions on Database Systems 9, 4 (1984), 560–595.
[4]
Akanksha Jain and Calvin Lin. 2016. Back to the Future: Leveraging Belady's Algorithm for Improved Cache Replacement. In Proceedings of ISCA. 78–89.
[5]
Song Jiang and Xiaodong Zhang. 2002. LIRS: an efficient low inter-reference recency set replacement policy to improve buffer cache performance. In Proceedings of SIGMETRICS. 31–42.
[6]
Peiquan Jin, Yi Ou, Theo Härder, and Zhi Li. 2012. AD-LRU: An efficient buffer replacement algorithm for flash-based databases. Data & Knowledge Engineering 72 (2012), 83–102.
[7]
Theodore Johnson and Dennis E. Shasha. 1994. 2Q: A Low Overhead High Performance Buffer Management Replacement Algorithm. In Proceedings of VLDB. 439–450.
[8]
Zhi Li, Peiquan Jin, Xuan Su, Kai Cui, Lihua Yue. CCF-LRU: A New Buffer Replacement Algorithm for Flash Memory. IEEE Transactions on Consumer Electronics. 55, 3 (2009), 1351-1359.
[9]
Ilya Loshchilov and Frank Hutter. 2017. SGDR: Stochastic Gradient Descent with Warm Restarts. In Proceedings of ICLR. OpenReview.net.
[10]
Sameen Maruf, Fahimeh Saleh, and Gholamreza Haffari.2021.A Survey on Document-level Neural Machine Translation: Methods and Evaluation. Comput. Surveys 54, 2 (2021), 45:1-45:36.
[11]
Nimrod Megiddo and Dharmendra S. Modha. 2003. ARC: A Self-Tuning, Low Overhead Replacement Cache. In Proceedings of FAST.
[12]
Liana V. Rodriguez, Farzana Beente Yusuf, Steven Lyons, Eysler Paz, Raju Rangaswami, Jason Liu, Ming Zhao, and Giri Narasimhan. 2021. Learning Cache Replacement with CACHEUS. In Proceedings of FAST. 341-354.
[13]
Ricardo Santana, Steven Lyons, Ricardo Koller, Raju Rangaswami, and Jason Liu. 2015. To ARC or Not to ARC. In Proceedings of HotStorage.
[14]
Subhash Sethumurugan, Jieming Yin, and John Sartori. 2021. Designing a Cost-Effective Cache Replacement Policy using Machine Learning. In Proceedings of HPCA. 291-303.
[15]
Zhan Shi, Xiangru Huang, Akanksha Jain, and Calvin Lin. 2019. Applying Deep Learning to the Cache Replacement Problem. In Proceedings of MICRO. 413-425.
[16]
Giuseppe Vietri, Liana V. Rodriguez, Wendy A. Martinez, Steven Lyons, Jason Liu, Raju Rangaswami, Ming Zhao, and Giri Narasimhan. 2018. Driving Cache Replacement with ML-based LeCaR. In Proceedings of HotStorage.
[17]
Lei Yang, Hong Wu, Tieying Zhang, Xuntao Cheng, Feifei Li, Lei Zou, Yujie Wang, Rongyao Chen, Jianying Wang, and Gui Huang. 2020. Leaper: A Learned Prefetcher for Cache Invalidation in LSM-tree based Storage Engines. Proceedings of the VLDB Endowment 13, 11 (2020), 1976-1989.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
DSDE '22: Proceedings of the 2022 5th International Conference on Data Storage and Data Engineering
February 2022
124 pages
ISBN:9781450395724
DOI:10.1145/3528114
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 24 June 2022

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

  • National Science Foundation of China

Conference

DSDE 2022

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 144
    Total Downloads
  • Downloads (Last 12 months)54
  • Downloads (Last 6 weeks)15
Reflects downloads up to 05 Jan 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media