MG-Buffer: A Read/Write-Optimized Multi-Grained Buffer Management Scheme for Database Systems

It is a common design in traditional DBMSs to use a page buffer consisting of fixed-sized pages to cache hot data. However, DBMSs have to read and cache at least one page even if one tuple is needed. As a result, there will be a number of unnecessary tuples resisting in the buffer, which will lower the efficiency of the buffer. This is even worse when the page size increases. Aiming to solve this problem, this work proposes to use a multi-grained buffer composed of a page buffer and a tuple buffer to improve the buffer efficiency. The page buffer is the same as usual, and the tuple buffer is to cache the hot or dirty tuples exactly requested by users. Following this idea, we present a new buffering scheme called MG-Buffer, which includes a so-called F-Buffer for pages and an S-Buffer for caching tuples migrated from F-Buffer. After introducing the architecture of MG-Buffer, we present the details of the operations for MG-Buffer, including migration and merging, read and write, and replacement. MG-Buffer is read-optimized because it can increase the hit ratio of the entire buffer. It is also write-optimized, because it first groups the dirty tuples cached in the S-Buffer before writing them to disks. We conduct trace-driven experiments on both magnetic disks and SSDs to evaluate MG-Buffer. The results suggest the efficiency of our proposal. Especially, MG-Buffer averagely achieves 20% higher hit ratio and reduces 20% more I/Os compared with traditional disk-based buffering schemes including LRU, 2Q, and LIRS. It also reduces 30% writes to SSD on average compared with existing SSD-aware buffering schemes like CFLRU, CFDC, and FD-Buffer.

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

[2]  Shan Wang,et al.  A Twin-Buffer Scheme for High-Throughput Logging , 2018, DASFAA.

[3]  Radu Stoica,et al.  Identifying hot and cold data in main-memory databases , 2013, 2013 IEEE 29th International Conference on Data Engineering (ICDE).

[4]  P. Cochat,et al.  Et al , 2008, Archives de pediatrie : organe officiel de la Societe francaise de pediatrie.

[5]  Chunxiao Xing,et al.  A Cost-aware Buffer Management Policy for Flash-based Storage Devices , 2015, DASFAA.

[6]  Michael Stonebraker,et al.  OLTP through the looking glass, and what we found there , 2008, SIGMOD Conference.

[7]  Peiquan Jin,et al.  Efficient Buffer Management for PCM-Enhanced Hybrid Memory Architecture , 2015, APWeb.

[8]  Craig Freedman,et al.  Hekaton: SQL server's memory-optimized OLTP engine , 2013, SIGMOD '13.

[9]  Ahmed Eldawy,et al.  Trekking Through Siberia: Managing Cold Data in a Memory-Optimized Database , 2014, Proc. VLDB Endow..

[10]  Michael Haubenschild,et al.  LeanStore: In-Memory Data Management beyond Main Memory , 2018, 2018 IEEE 34th International Conference on Data Engineering (ICDE).

[11]  Hui Zhao,et al.  BPCLC: An Efficient Write Buffer Management Scheme for Flash-Based Solid State Disks , 2010, J. Digit. Content Technol. its Appl..

[12]  Maksym Semikin,et al.  Reducing the Storage Overhead of Main-Memory OLTP Databases with Hybrid Indexes , 2017 .

[13]  Song Jiang,et al.  LIRS: an efficient low inter-reference recency set replacement policy to improve buffer cache performance , 2002, SIGMETRICS '02.

[14]  Peiquan Jin,et al.  CCF-LRU: a new buffer replacement algorithm for flash memory , 2009, IEEE Transactions on Consumer Electronics.

[15]  Wolfgang Lehner,et al.  SAP HANA database: data management for modern business applications , 2012, SGMD.

[16]  Peiquan Jin,et al.  Efficient Buffer Management for Tree Indexes on Solid State Drives , 2014, International Journal of Parallel Programming.

[17]  Mark Lillibridge,et al.  In-Memory Performance for Big Data , 2014, Proc. VLDB Endow..

[18]  Peiquan Jin,et al.  Self-Adaptive Linear Hashing for solid state drives , 2016, 2016 IEEE 32nd International Conference on Data Engineering (ICDE).

[19]  Song Jiang,et al.  Workload analysis of a large-scale key-value store , 2012, SIGMETRICS '12.

[20]  Peiquan Jin,et al.  AD-LRU: An efficient buffer replacement algorithm for flash-based databases , 2012, Data Knowl. Eng..

[21]  Bin Fan,et al.  MemC3: Compact and Concurrent MemCache with Dumber Caching and Smarter Hashing , 2013, NSDI.

[22]  Joonwon Lee,et al.  CFLRU: a replacement algorithm for flash memory , 2006, CASES '06.

[23]  Xiaoning Ding,et al.  A General Approach to Scalable Buffer Pool Management , 2016, IEEE Transactions on Parallel and Distributed Systems.

[24]  Jianliang Xu,et al.  FD-buffer: a buffer manager for databases on flash disks , 2010, CIKM.

[25]  Peiquan Jin,et al.  CFDC: a flash-aware replacement policy for database buffer management , 2009, DaMoN '09.

[26]  Michael Stonebraker,et al.  H-store: a high-performance, distributed main memory transaction processing system , 2008, Proc. VLDB Endow..

[27]  Michael Stonebraker,et al.  Anti-Caching: A New Approach to Database Management System Architecture , 2013, Proc. VLDB Endow..

[28]  Eddie Kohler,et al.  Speedy transactions in multicore in-memory databases , 2013, SOSP.

[29]  Linpeng Huang,et al.  An Adaptive Eviction Framework for Anti-caching Based In-Memory Databases , 2018, DASFAA.