Access-Pattern-Aware Personalized Buffer Management for Database Systems

Yigui Yuan, Zhaole Chu, Peiquan Jin, Shouhong WanSEKE 2022

Introduction

Buffer management is a cornerstone of Database Management Systems (DBMS), tasked with maintaining "hot" data in memory to minimize high-latency disk I/O operations. For decades, the Least Recently Used (LRU) algorithm has served as the industry standard. However, LRU suffers from significant drawbacks, most notably its lack of "scan-resistance." A single large sequential scan can effectively flush out valuable data from the buffer, degrading performance. While adaptive algorithms like ARC or LeCaR have been proposed, they typically apply a single global policy to the entire buffer. This "one-size-fits-all" approach fails to account for the diverse access patterns inherent in modern databases, where different files may exhibit cyclic, random, or skewed behaviors simultaneously.

The Personalized Buffer Manager (PBM)

To address these inefficiencies, we propose the Personalized Buffer Manager (PBM). PBM shifts the paradigm from a monolithic buffer to a partitioned architecture where the buffer is divided into file-specific "zones."

Architecture of the Personalized Buffer Manager (PBM).

The PBM framework operates through three primary stages:

  1. Workload Classification: The system analyzes the stream of page requests by calculating statistical features such as the Correlation List (using cosine similarity to detect distribution shifts) and Page Coverage (measuring the frequency of page reuse).
  2. Pattern Mapping: Based on these features, files are categorized into three types:
  3. Type A (Random/Scan): Low reuse patterns. PBM minimizes these zones to prevent buffer pollution.
  4. Type B (Cyclic/Skewed): Managed via Least Frequently Used (LFU) to prioritize high-frequency pages.
  5. Type C (Varying): Managed via Adaptive Replacement Cache (ARC) to balance recency and frequency.
  6. Dynamic Zone Sizing: PBM employs "shadow caches" (evict lists) to track potential hits if a zone were larger. It dynamically reallocates memory to zones demonstrating higher utility.

Experimental Evaluation

We evaluated PBM using a synthetic workload comprising 10 files (100,000 pages total) with manually assigned access patterns (random, scan, skewed, cyclic, and vary).

Hit ratio performance for cyclic access patterns across different buffer sizes.

The results demonstrate that PBM significantly outperforms traditional and learning-based managers. In regular workloads, PBM achieved hit ratios 1.66x higher than LRU and 2.03x higher than LFU. Even in shifting workloads—where the "hot" files change mid-test—PBM maintained a 1.90x lead over LRU, showcasing its robust adaptivity. Furthermore, PBM reduced total page I/Os by up to 14% compared to its closest competitors.

Conclusion

PBM demonstrates that isolation is a powerful tool for optimization. By recognizing that different data files have different needs, PBM avoids the compromises of global policies. Its low-overhead statistical approach provides the benefits of intelligence without the computational costs of deep learning. Future work will explore extending this personalized management to flash-based storage (SSDs) and integrating more advanced machine learning models for even finer-grained optimization.

Summary updated

BibTeX
@inproceedings{yuan2022access,
  author = {Yigui Yuan and Zhaole Chu and Peiquan Jin and Shouhong Wan},
  title = {{Access-Pattern-Aware Personalized Buffer Management for Database Systems}},
  booktitle = {SEKE},
  year = {2022},
  doi = {10.18293/seke2022-141},
}
Figure