Data Compression for Analytics over Large-scale In-memory Column Databases (Summary Paper)

Chunbin Lin, Jianguo Wang, Yannis PapakonstantinouarXiv 2016

Abstract

Modern in-memory databases (IMDBs) have fundamentally changed the performance landscape of data management. As the bottleneck shifts from disk I/O to CPU cycles and memory bandwidth, the role of data compression must be re-evaluated. This paper argues that compression remains vital for IMDBs, not just for storage efficiency, but as a performance multiplier. By selecting encoding schemes that allow for direct query execution on compressed data, systems can bypass expensive decompression steps and maximize throughput.

Introduction: The New Bottleneck

In traditional disk-resident databases, compression is an obvious choice; the CPU cost of decompression is trivial compared to the latency of mechanical disk reads. However, RAM is orders of magnitude faster. In this environment, if a compression scheme requires heavy CPU intervention to decompress data before processing, the performance benefits of in-memory storage are negated. The challenge lies in identifying compression methods that reduce the data footprint while remaining "query-friendly."

Compression Strategies for OLAP

The authors analyze several primary compression schemes tailored for Online Analytical Processing (OLAP) workloads:

  1. Dictionary Encoding (DICT): This method maps high-cardinality strings to compact integer codes. The authors propose bit-DICT, which uses the minimum number of bits necessary to represent the domain (e.g., 6 bits for 50 states), rather than standard 32-bit integers.
  2. Run-Length Encoding (RLE): Highly effective for sorted columns, RLE stores a value and its repetition count. The paper introduces vsb-RLE, a hybrid approach combining RLE with bit-DICT to minimize the space required for the values themselves.
  3. Bitmap Encoding: This uses bit-vectors to represent the presence of values, enabling extremely fast bitwise logical operations (AND/OR) for columns with small domain sizes.
  4. Huffman Encoding: While popular for general-purpose compression, the authors advise against it for in-memory analytics. Its variable-length nature prevents random access and partial decompression, leading to significant performance bottlenecks.

The Decision Framework

To assist developers in selecting the optimal encoding, the paper provides a decision tree based on data characteristics such as type, sorting, and domain size.

Decision tree for selecting optimal compression schemes based on data characteristics.

The core insight is that data should be transformed into integers whenever possible, as integer comparisons are significantly more efficient than string comparisons for modern CPUs.

Experimental Results

The proposed schemes were evaluated using a 1-billion-row integer column. The results demonstrate that specialized RLE variants can achieve massive space reductions without sacrificing query speed.

Comparison of storage requirements for different RLE variants on a 1-billion-row dataset.

As shown in the table, the uncompressed data required 4GB of memory. The optimized vsb-RLE scheme reduced this to a mere 6.5MB. Beyond space savings, direct execution on these compressed formats often outperforms raw data processing because the CPU fetches less data from the memory bus, improving cache efficiency. Conversely, Huffman decompression for just 1 million rows took 3.2 minutes, highlighting its unsuitability for high-performance analytics.

Conclusion

Data compression in in-memory databases is a dual-purpose tool for space efficiency and performance acceleration. By leveraging schemes like bit-DICT and vsb-RLE, systems can achieve staggering compression ratios while enabling direct query execution. Future work should explore the impact of these schemes on write-heavy (OLTP) workloads and the potential for further acceleration using SIMD hardware instructions.

Summary updated

BibTeX
@misc{lin2016data,
  author = {Chunbin Lin and Jianguo Wang and Yannis Papakonstantinou},
  title = {{Data Compression for Analytics over Large-scale In-memory Column Databases (Summary Paper)}},
  year = {2016},
  eprint = {1606.09315},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1606.09315},
}
Figure