TerseCades: Efficient Data Compression in Stream Processing

Gennady Pekhimenko, Chuanxiong Guo, Myeongjae Jeon, Peng Huang, Lidong ZhouUSENIX ATC 2018 · OpenReview

TL;DR

This paper introduces TerseCades, a novel stream processing system that significantly boosts throughput by integrating efficient data compression. By optimizing stream engines and leveraging hardware acceleration, TerseCades achieves substantial performance gains, making in-memory stream processing more scalable and cost-effective.

What Problem Does This Paper Address?

Modern stream processing systems are increasingly vital for real-time monitoring and analytics, handling massive volumes of machine-generated data. A key challenge is the immense pressure these systems place on main memory capacity and bandwidth. To meet real-time requirements, data often resides entirely in memory, which is both costly and difficult to scale. While data compression is a natural solution to alleviate memory pressure, traditional compression techniques are often too slow for the low-latency demands of stream processing, where decompression can become a bottleneck. This paper investigates how to make data compression effective and beneficial for stream processing, addressing the gap between the potential of compression and its practical application in high-throughput, in-memory environments.

Methods

TerseCades tackles this challenge through a multi-pronged approach:

  • Stream Engine Optimizations: The authors first identify and eliminate major sources of inefficiency in existing stream engines. This includes techniques like static memory allocation, pooling, array reshaping, and custom hashmap implementations to reduce overhead beyond just compression.
  • Efficient Compression Algorithms: They focus on compression algorithms that are both effective and have low computational overhead. Base-Delta encoding is highlighted for its simplicity and suitability for various data types, with a lossy variant explored for further gains where precision isn't critical. For floating-point data, ZFP is used.
  • Hardware Acceleration: To minimize decompression costs, TerseCades leverages hardware acceleration. This includes using SIMD instructions (like Intel AVX) for parallel decompression and exploring GPUs and FPGAs for even greater acceleration.
  • Direct Execution on Compressed Data: A key innovation is enabling operators to execute directly on compressed data without full decompression. This is particularly effective for stateless operators like "Where" and aggregation operators, significantly reducing computation and avoiding decompression overhead entirely.

Datasets

The paper evaluates TerseCades using several real-world datasets:

  • Pingmesh Data: This dataset consists of network reachability measurements from production data centers, used for cloud analytics and troubleshooting. It includes fields like timestamps, IP addresses, and round-trip times.
  • IaaS VM Performance Counter Data: This dataset contains performance metrics from virtual machines, used for monitoring VM health and detecting issues.
  • Geolocation IoT Data: This dataset comprises GPS coordinates from the GeoLife project, representing user movements over time.
  • Weather Data: This dataset includes weather observations from sensors during Hurricane Katrina.

The paper does not introduce new benchmarks but uses existing ones like the STREAM benchmark suite for microbenchmarking.

Key Insights and Ideas

  • Compression is not a silver bullet: Simply compressing data doesn't automatically translate to proportional throughput gains. The overhead of compression/decompression and other system bottlenecks can negate benefits.
  • Low-overhead compression is crucial: For stream processing, algorithms like Base-Delta encoding, which are simple and fast, are far more effective than complex, high-ratio algorithms that are too slow.
  • Hardware acceleration is key: Offloading decompression to SIMD, GPUs, or FPGAs is essential to keep it from becoming a bottleneck.
  • Direct execution on compressed data is a game-changer: This technique can offer performance benefits beyond just compression, sometimes even outperforming ideal uncompressed scenarios.
  • Stream engines are often not memory-bandwidth bound: Many existing engines have significant overheads in areas like memory allocation and data manipulation, which must be addressed before compression benefits can be fully realized.

Key Results

  • Order-of-magnitude throughput improvement: TerseCades, with its initial optimizations, achieved an order of magnitude higher throughput compared to the state-of-the-art Trill system.
  • Additional 50% throughput boost: Further optimizations, including hardware acceleration and direct execution on compressed data, provided an additional 50% improvement.
  • Significant compression ratios: Base-Delta encoding achieved compression ratios of up to 8x for timestamps and 2x for RTT values. Lossy compression and ZFP achieved even higher ratios (e.g., 4.5x to 6x for IoT and performance counter data).
  • Reduced memory footprint: Compression allowed handling significantly larger windows (e.g., 4x larger) due to reduced memory pressure.
  • Real-world impact: In a production deployment, TerseCades reduced the server infrastructure for Pingmesh processing from 16 servers to just one.

Limitations and Future Work

  • Operator support: TerseCades currently supports a subset of operators found in mature frameworks like Trill. The authors acknowledge that extending support to more operators is necessary for broader applicability.
  • Generality: While the design is intended to be general, the authors note that the choice of memory allocation (row vs. column-oriented) is left to the programmer, suggesting potential for more automatic optimization.
  • Future Work: The authors envision TerseCades being extended to be as general as existing frameworks without sacrificing performance. They also hope their work will encourage the incorporation of data compression into future stream processing engines.

Summary updated

BibTeX
@inproceedings{pekhimenko2018tersecades,
  author = {Gennady Pekhimenko and Chuanxiong Guo and Myeongjae Jeon and Peng Huang and Lidong Zhou},
  title = {{TerseCades: Efficient Data Compression in Stream Processing}},
  booktitle = {USENIX ATC},
  year = {2018},
  url = {https://openreview.net/forum?id=MVFN6ZQYl2},
}
Figure