LST-Bench: Benchmarking Log-Structured Tables in the Cloud

Jesús Camacho-Rodríguez, Ashvin Agrawal, Anja Gruenheid, Ashit Gosalia, Cristian Petculescu, Josep Aguilar-Saborit, Avrilia Floratou, Carlo Curino, Raghu Ramakrishnan

TL;DR

LST-Bench is a new open-source benchmarking framework designed to evaluate Log-Structured Tables (LSTs) like Delta Lake, Apache Iceberg, and Apache Hudi. Unlike traditional benchmarks that provide a "snapshot" of performance, LST-Bench measures how these systems handle the complexities of the cloud, specifically focusing on performance stability over time as data accumulates and the impact of background maintenance operations.

What Problem Does This Paper Address?

The industry has shifted from static, immutable columnar files (like Parquet) to Log-Structured Tables (LSTs) that allow for ACID transactions, updates, and "time travel" on top of cloud object storage. However, existing benchmarks like TPC-DS were designed for traditional data warehouses and fail to capture the unique lifecycle of an LST.

In an LST, every update "deposits" a new layer of data. Over time, these layers accumulate, leading to "metadata bloat" and fragmented small files that can cause query performance to crater. Traditional benchmarks don't measure this "longevity" or the "resilience" of a system—how well it recovers after maintenance (compaction). LST-Bench fills this gap by providing a framework to measure performance degradation and the effectiveness of different storage strategies (Copy-on-Write vs. Merge-on-Read).

Methods

The authors propose a conceptual model for LSTs based on three dimensions: Metadata (how the table state is tracked), Algorithms (how writes and maintenance are handled), and Engines (how Spark or Trino interact with the storage).

Key technical contributions include:

  • Workload Patterns (WPs): Instead of a linear sequence of queries, LST-Bench uses "packages" that mix read, write, and maintenance tasks.
  • WP1 (Longevity): Interleaves multiple read/write cycles to see how performance trends over time.
  • WP2 (Resilience): Evaluates if "Optimize" (compaction) tasks successfully restore performance to baseline levels.
  • WP3 (Concurrency): Runs reads and writes simultaneously on the same or different clusters.
  • WP4 (Time Travel): Measures the overhead of querying historical versions of data.
  • Stability Metric ($S_{DR}$): A novel metric that quantifies the rate of performance degradation. A lower $S_{DR}$ indicates a more stable system that resists slowing down as more data is added.

Datasets

The framework uses the standard TPC-DS dataset (at Scale Factors 100 and 1000) as its base. However, it extends TPC-DS by using its data generator to create continuous "trickle" updates and deletes, mimicking real-world analytical workloads rather than just a one-time bulk load.

Key Insights and Ideas

  • The "Spark Tax" on Stability: By default, Apache Spark’s distribution mode can create hundreds of thousands of small "delta" files during updates. This leads to a massive increase in storage API calls (up to 5x), which significantly degrades read performance.
  • Hudi’s "Pay Upfront" Philosophy: Apache Hudi showed the best stability ($S_{DR} \approx 0.02$). It performs more work during the write phase to avoid creating small files, leading to slower writes but very consistent read performance over time.
  • Maintenance is Mandatory: For Delta Lake and Iceberg, performance can degrade by up to 6.8x if periodic "Optimize" (compaction) tasks are not run. These tasks are the difference between a functional system and a broken one in long-running deployments.
  • Engine Matters: Trino often executed queries nearly twice as fast as Spark for the same LST data, partly due to differences in how they handle checkpointing and metadata.

Key Results

  • Degradation: In WP1 (Longevity), Delta Lake's latency increased from 2.7 hours to 5.2 hours (a 92% increase) after just a few update cycles without maintenance.
  • Recovery: WP2 (Resilience) proved that "Optimize" tasks are highly effective; for Iceberg-MoR, latency dropped by over 3x after a compaction phase, successfully reducing storage API calls.
  • Concurrency: Using multiple clusters for concurrent reads and writes (WP3-Multi) showed that Trino can achieve a 40% gain in experiment time with only minor degradation in individual statement speed, highlighting the benefits of compute-storage decoupling.

Limitations and Future Work

The authors acknowledge several areas for expansion:

  • Automation: LST-Bench currently requires the user to manually deploy and configure the compute clusters (Spark/Trino). Future versions aim to automate this.
  • Feature Coverage: The current version doesn't yet evaluate security, access control, or complex schema evolution (though these are planned).
  • Dynamic Tasks: The authors want to introduce "parameterized custom tasks" that can define workloads dynamically based on the state of the data (e.g., triggering a compaction only when a certain number of small files is reached).

The code for LST-Bench is open-source and available at: https://github.com/microsoft/lst-bench/.

Summary updated

BibTeX
@article{camachorodriguez2024lst,
  author = {Jesús Camacho-Rodríguez and Ashvin Agrawal and Anja Gruenheid and Ashit Gosalia and Cristian Petculescu and Josep Aguilar-Saborit and Avrilia Floratou and Carlo Curino and Raghu Ramakrishnan},
  title = {{LST-Bench: Benchmarking Log-Structured Tables in the Cloud}},
  journal = {Proc. ACM Manag. Data},
  year = {2024},
  doi = {10.1145/3639314},
}
Figure