[Paper Review] Compacting Transactional Data in Hybrid OLTP & OLAP Databases
This paper proposes an asynchronous compaction technique for hybrid OLTP/OLAP databases that separates hot (frequently accessed) and cold (rarely accessed) data, compresses the cold data, and stores it on huge memory pages to reduce memory usage and accelerate OLAP query processing. The approach achieves significant performance gains with minimal impact on OLTP throughput by offloading compression and reorganization to background threads.
Growing main memory sizes have facilitated database management systems that keep the entire database in main memory. The drastic performance improvements that came along with these in-memory systems have made it possible to reunite the two areas of online transaction processing (OLTP) and online analytical processing (OLAP): An emerging class of hybrid OLTP and OLAP database systems allows to process analytical queries directly on the transactional data. By offering arbitrarily current snapshots of the transactional data for OLAP, these systems enable real-time business intelligence. Despite memory sizes of several Terabytes in a single commodity server, RAM is still a precious resource: Since free memory can be used for intermediate results in query processing, the amount of memory determines query performance to a large extent. Consequently, we propose the compaction of memory-resident databases. Compaction consists of two tasks: First, separating the mutable working set from the immutable "frozen" data. Second, compressing the immutable data and optimizing it for efficient, memory-consumption-friendly snapshotting. Our approach reorganizes and compresses transactional data online and yet hardly affects the mission-critical OLTP throughput. This is achieved by unburdening the OLTP threads from all additional processing and performing these tasks asynchronously.
Motivation & Objective
- To address the memory efficiency challenge in in-memory hybrid OLTP/OLAP databases where data compression is hindered by high transaction throughput requirements.
- To enable efficient, real-time analytical query processing directly on transactional data by optimizing data layout and compression.
- To reduce memory consumption and improve query performance without degrading OLTP transaction throughput.
- To develop a lightweight, hardware-assisted monitoring mechanism for identifying cold data chunks suitable for compaction.
Proposed method
- Uses a hardware-assisted, low-overhead monitoring component to track data access patterns and identify hot and cold data segments.
- Separates the database into hot (mutable) and cold (immutable) data based on access frequency and working set assumptions.
- Applies lossless compression to cold data chunks and stores them on huge virtual memory pages to improve cache efficiency and reduce memory footprint.
- Performs data reorganization and compression asynchronously, decoupled from OLTP transaction processing to avoid performance degradation.
- Employs order-preserving dictionaries and a memory-efficient secondary index (e.g., red-black tree) to accelerate prefix and range scans on compressed data.
- Uses invalidation markers instead of immediate deletion for cold data, preserving scan performance even under high invalidation rates.
Experimental results
Research questions
- RQ1Can data compression be effectively integrated into high-performance OLTP systems without degrading transaction throughput?
- RQ2How can cold data be efficiently identified and isolated for compression in a way that minimizes interference with active transaction processing?
- RQ3What compression and storage techniques optimize both memory consumption and OLAP query performance in hybrid OLTP/OLAP systems?
- RQ4To what extent does asynchronous compaction impact OLTP performance while improving analytical query execution?
- RQ5How does the use of order-preserving dictionaries and compact secondary indexes affect query performance on compressed data?
Key findings
- The proposed compaction technique reduces memory consumption significantly while maintaining near-ideal OLTP throughput, with performance degradation of only 4.5% to 7.9% even when 1/36 of the data is invalidated.
- The hot/cold clustering mechanism successfully identifies the majority of the database as cold data, enabling effective compression.
- Order-preserving dictionaries outperform hash-based lookup for selectivities above 3.3%, making them efficient for analytical queries with moderate to high selectivity.
- Secondary indexes based on red-black trees reduce memory usage to 24 bytes per entry and outperform dictionaries for low-selectivity queries.
- Compression of cold data on huge memory pages improves cache locality and query execution speed, especially for scan-intensive analytical workloads.
- The invalidation mechanism for frozen chunks maintains high scan performance, even under extreme invalidation rates, due to efficient memory layout and access patterns.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.