NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Zero-Execution Retrieval-Augmented Configuration Tuning of Spark Applications

Raunaq Suri, Ilan Gofman, Guangwei Yu, Jesse C. CresswellarXiv 2025

TL;DR

This paper introduces ZEST, a novel zero-execution tuning method for Apache Spark applications. ZEST leverages embeddings of Spark's logical query plans to retrieve optimal configurations from historical data, eliminating the need for initial query executions and significantly reducing tuning costs, especially for ad hoc queries.

What Problem Does This Paper Address?

Optimizing the performance of large-scale data processing frameworks like Apache Spark is crucial. Spark has hundreds of configurable parameters that heavily influence execution time and scalability. Traditional tuning methods, including online and one-execution approaches, require multiple runs of a query to gather runtime information and iteratively refine parameters. This is computationally expensive and impractical for "ad hoc" queries that are run only once or infrequently. The core challenge is to tune Spark configurations effectively before the first execution, a concept known as zero-execution tuning, without access to runtime performance data.

Methods

The proposed method, ZEST (Zero-Execution Spark Tuning), reframes configuration tuning as a retrieval problem. The key steps are:

  1. Logical Plan Embedding: ZEST processes a Spark query to generate its logical plan. This plan, which describes the high-level operations without execution details, is then embedded into a vector representation using a pre-trained text embedding model.
  2. Retrieval: These logical plan embeddings are used to search a pre-built vector database containing embeddings of historical logical plans and their corresponding optimal configurations.
  3. Configuration Recommendation: ZEST retrieves the top-k most similar historical configurations and recommends the parameter-wise mean of these configurations as the predicted optimal settings for the new query.

This approach entirely bypasses the need for initial query executions, making it suitable for zero-execution tuning. The authors experimented with various embedding models and found jina-embeddings-v3 with k=29 to be optimal.

Datasets

The authors utilized the following datasets for their research:

  • TPC-H [31] and TPC-DS [30] benchmarks: These standard benchmarks were used to generate a large and comprehensive suite of Spark queries.
  • Newly Introduced Dataset: The paper introduces a dataset comprising 19,360 query executions, including logical plans, optimal configurations, and runtime metrics. This dataset was split into 90% for training/indexing and 10% for testing.

Key Insights and Ideas

  • Logical Plans as Rich Features: The logical plan of a Spark query contains a wealth of information about its structure and operations, making it a powerful feature for predicting optimal configurations, even before runtime.
  • Retrieval vs. Optimization: Shifting from an optimization-centric view to a retrieval-based approach for configuration tuning can unlock zero-execution capabilities.
  • Ad Hoc Queries Benefit Most: Zero-execution tuning is particularly valuable for ad hoc and analytical queries that are run infrequently, where the cost of traditional tuning methods is prohibitive.
  • AQE's Impact: The advent of Adaptive Query Execution (AQE) in Spark 3.0 has diminished the need for some online tuning aspects, but the fundamental challenge of initial configuration remains.
  • Parameter Sensitivity: Not all Spark parameters are equally important. The authors identified six key parameters that significantly impact performance and focused their search space on these.

Key Results

  • Performance Close to State-of-the-Art: ZEST achieves 93.3% of the runtime improvement of state-of-the-art one-execution optimization methods, entirely avoiding the slow initial execution.
  • Significant Speedup: Compared to default Spark parameters, ZEST provides substantial speedups, with an average speedup of 7.0x for TPC-DS and 7.3x for TPC-H queries.
  • Cost-Effective: ZEST offers the lowest accumulated cost of query executions, especially for scenarios with fewer than 140 repeated runs, making it highly cost-effective for ad hoc workloads.
  • Robustness: ZEST demonstrates robustness across different input data sizes and even when tested on unseen databases (data catalogs), showing only a minor performance drop.

Limitations and Future Work

  • Embedding Model Dependence: The performance of ZEST is dependent on the quality of the chosen embedding model. While they tested several, further research into Spark-specific embedding models could yield improvements.
  • Index Quality: The effectiveness of ZEST relies on the quality and comprehensiveness of the historical data used to build the retrieval index.
  • Future Work: The authors suggest exploring more sophisticated retrieval strategies, investigating the impact of different embedding models and architectures, and extending ZEST to other distributed computing frameworks. They also highlight the potential of their released dataset for future research in this area.

Summary updated

BibTeX
@misc{suri2025zero,
  author = {Raunaq Suri and Ilan Gofman and Guangwei Yu and Jesse C. Cresswell},
  title = {{Zero-Execution Retrieval-Augmented Configuration Tuning of Spark Applications}},
  year = {2025},
  eprint = {2503.03826},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.03826},
}
Figure