Columnar Storage Optimization and Caching for Data Lakes

Guodong Jin, Haoqiong Bian, Yueguo Chen, Xiaoyong DuEDBT 2022

Abstract

Modern data lakes rely on columnar storage formats like Parquet and ORC to handle massive datasets. However, these formats often suffer from performance bottlenecks due to fragmented I/O in wide tables and inefficient generic caching mechanisms. This paper introduces Pixels, a storage engine that optimizes data lake performance through two primary innovations: inter-row-group column compaction and a lazy columnar cache. By reordering data to enable sequential reads and prioritizing long-term query patterns in memory, Pixels achieves up to a 5x speedup in query latency compared to traditional columnar layouts.

Introduction

Data lakes typically employ a "PAX" layout, where data is horizontally partitioned into row groups and vertically stored in columns. While this facilitates fast ingestion, it creates a significant trade-off for "wide tables" containing hundreds or thousands of columns. Small row groups, necessary for memory-efficient ingestion, result in tiny, fragmented column chunks. Consequently, analytical queries accessing a subset of columns must perform numerous random disk seeks, severely degrading performance. Furthermore, standard caching layers like the Linux Page Cache operate at a file-block level, leading to "cache pollution" where irrelevant columns occupy valuable memory.

The Pixels Engine

Pixels is designed as a high-performance columnar storage engine that addresses these bottlenecks without sacrificing ingestion speed. Its architecture integrates with existing query engines like Presto and Spark, utilizing a metadata server (Etcd) and monitoring tools (Prometheus) to manage data layout and caching dynamically.

Inter-row-group Column Compaction

The first major innovation in Pixels is inter-row-group column compaction. Unlike traditional formats that maintain the row group boundaries established at ingestion, Pixels asynchronously merges multiple small row groups into large blocks (typically 1-2GB). Within these blocks, the engine reorders data so that chunks of the same column from different row groups are stored contiguously.

The process of inter-row-group column compaction, transforming fragmented physical row groups into large, sequentially readable blocks.

This transformation converts what would have been a series of random seeks into a single, high-bandwidth sequential read. Because this process is asynchronous, it preserves the benefits of fast ingestion while optimizing the storage layout for subsequent analytical workloads.

Lazy Columnar Caching

To optimize memory usage, Pixels implements a Lazy Columnar Cache. Standard caches often use a Least Recently Used (LRU) policy, which can lead to "thrashing" in analytical environments where a single large "cold" query might evict "hot" data.

Pixels takes a more strategic approach. A background Storage Optimizer monitors query history to calculate the "cache efficiency" of individual column chunks. It generates a global cache plan that nodes follow, ensuring that only the most valuable data—those columns frequently accessed relative to their size—are kept in memory. This "lazy" update policy prevents transient query spikes from disrupting the long-term cache state.

Evaluation

The researchers evaluated Pixels using a 3.75TB real-world dataset with 1,187 columns and over 500 unique queries. The test environment consisted of a 4-node cluster using Presto as the query engine and HDFS for storage.

Key Results

The performance gains were substantial across several metrics. Inter-row-group compaction (InterRG) alone provided a 3.1x to 5.0x improvement over standard intra-row-group ordering. When combined with the specialized columnar cache (ColCache), the system significantly outperformed the Linux Page Cache.

Query latency comparison across different storage and caching configurations, showing significant speedups with Pixels' InterRG and ColCache.

As shown in the evaluation, the 25th percentile query latency dropped from 169.6 seconds in a standard Parquet-style layout to just 3.4 seconds with Pixels. This represents a transformative improvement for interactive data exploration.

Conclusion

Pixels demonstrates that breaking the physical boundaries of traditional row groups and adopting a column-aware, lazy caching strategy can dramatically enhance data lake performance. By prioritizing sequential I/O and long-term cache efficiency, Pixels provides a robust solution for the challenges of wide-table analytics in modern data architectures. Future work will focus on adapting these optimizations for cloud-native storage environments like AWS S3 and further refining adaptive cache replacement policies.

Summary updated

BibTeX
@inproceedings{jin2022columnar,
  author = {Guodong Jin and Haoqiong Bian and Yueguo Chen and Xiaoyong Du},
  title = {{Columnar Storage Optimization and Caching for Data Lakes}},
  booktitle = {EDBT},
  year = {2022},
  url = {https://openreview.net/forum?id=IvOujeIUd8},
}

Loading related content...

Figure