Improving Time Series Data Compression in Apache IoTDB

Yuxin Tang, Feng Zhang, Jiawei Guan, Yuan Tian, Xiangdong Huang, Chen Wang, Jianmin Wang, Xiaoyong DuPVLDB 2025

TL;DR

This paper introduces CompressIoTDB, a novel homomorphic compression framework for Apache IoTDB that enables direct computation on compressed time series data. By developing a new data structure and system-level optimizations, CompressIoTDB significantly speeds up query processing and reduces memory usage, addressing the latency bottleneck of traditional time series databases.

What Problem Does This Paper Address?

Time series data is exploding across various domains like IoT, finance, and healthcare. While compression is crucial for managing storage and bandwidth, existing methods in time series databases (TSDBs) typically require full decompression before any query can be executed. This decompression step introduces significant latency and consumes substantial resources, especially for large datasets. Homomorphic compression (HC) offers a solution by allowing computations directly on compressed data, but current HC techniques are not well-suited for the unique characteristics of time series data, such as high-frequency sampling, temporal alignment, and timestamp-dependent queries. This paper aims to bridge this gap by developing a HC framework specifically for TSDBs.

Methods

The core of CompressIoTDB lies in its novel CompColumn data structure. This structure is designed to efficiently manage compressed time series data in memory, abstracting away compression details and providing unified interfaces for query operators. This allows for direct computation on compressed data without needing to decompress it first.

Key techniques and optimizations include:

  • Theoretical Framework for Homomorphic Compression: The paper proposes a formal model for homomorphic queries on time series data, ensuring theoretical validation of the approach.
  • CompColumn Data Structure: This modular structure supports various compression schemes and provides efficient access to compressed data through compression block arrays, compression offset indexes, and hint indexes.
  • Operator Module: Implements homomorphic versions of key time series operators (filter, join, aggregation, sliding window, expression, slicing) that operate directly on compressed data.
  • System-Level Optimizations:
    • Dynamic Auxiliary Management: Efficiently handles auxiliary data like null bitmaps and deletion lists without full decompression.
  • Late Decompression for TsFile: Defers general-purpose decompression until data is actually accessed, significantly reducing I/O and CPU overhead. This is integrated into Apache IoTDB's TsFile storage layer.

The framework supports light-weight compression algorithms like Run-Length Encoding (RLE), Dictionary Encoding, and Ts_2Diff, with further compression applied using LZ4.

Datasets

The authors evaluated CompressIoTDB using:

  • Five open-source real-world time series datasets: Weather Forecast (WF), AMPds, Smart Grid (SG), Linear Road (LR), and Computer Monitor (CM).
  • Synthetic datasets: Generated using the IoT-benchmark, with varying repetition rates and series lengths.
  • Benchmark queries: Ten queries derived from real-world applications and three basic queries from the IoT-benchmark, extended to support expression queries.

Key Insights and Ideas

  • Homomorphic Compression is a Game-Changer for TSDBs: The paper demonstrates that applying HC principles to time series data can fundamentally change query processing, moving from a "decompress-then-query" paradigm to "query-on-compressed."
  • CompColumn is the Key Abstraction: The novel CompColumn structure is crucial for enabling direct computation by abstracting compression complexities, making it easier to integrate HC into existing TSDBs like IoTDB.
  • Late Decompression is Critical for Real-World Performance: Deferring general-purpose decompression until absolutely necessary is a significant optimization, especially when light-weight compression already achieves good ratios. This avoids wasting resources on data that might not even be queried.
  • Compression Ratio Directly Impacts Performance Gains: Datasets with higher repetition rates (leading to better light-weight compression) show more substantial performance improvements, highlighting the synergy between compression and HC.

Key Results

  • Average Throughput Improvement: CompressIoTDB achieved an average throughput improvement of 53.4% over Apache IoTDB.
  • Memory Usage Reduction: An average memory usage reduction of 20% was observed.
  • Latency Reduction: Latency was reduced by 33.1% compared to the original IoTDB and 20.3% compared to uncompressed data.
  • HintIndex Effectiveness: The HintIndex provided an average performance improvement of 11.7%.
  • Late Decompression Impact: CompressIoTDB-NoLate (without late decompression) showed 14.5% higher latency than the full CompressIoTDB.
  • Scalability: The system demonstrated strong scalability, with performance improvements increasing with dataset size and repetition rates.

Limitations and Future Work

  • Low Repetition Rate Performance: At very low repetition rates, CompressIoTDB's performance might slightly lag behind uncompressed data due to the overhead of maintaining compression structures. However, the authors note that such cases are rare in practice.
  • Delta-Encoding Support: While the paper focuses on RLE and Dictionary encoding for HC, delta-based compression methods have limited homomorphic support. The authors suggest further research into optimizing HC for these schemes.
  • Future Work: The paper suggests exploring more advanced compression algorithms and further optimizing the system for specific hardware architectures. The theoretical framework could also be extended to cover more complex query types and scenarios.

Summary updated

BibTeX
@article{tang2025improving,
  author = {Yuxin Tang and Feng Zhang and Jiawei Guan and Yuan Tian and Xiangdong Huang and Chen Wang and Jianmin Wang and Xiaoyong Du},
  title = {{Improving Time Series Data Compression in Apache IoTDB}},
  journal = {Proc. VLDB Endow.},
  year = {2025},
  doi = {10.14778/3748191.3748204},
}
Figure