MFTune: An Efficient Multi-fidelity Framework for Spark SQL Configuration Tuning

Beicheng Xu, Lingching Tung, Yuchen Wang, Yupeng Lu, Bin CuiarXiv 2026

TL;DR

Tuning Apache Spark SQL configurations is notoriously slow and complex due to massive workloads and over 200 interdependent knobs. This paper introduces MFTune, a multi-fidelity optimization framework that uses smart, query-based subsets as cheap performance proxies instead of full-scale runs. By combining this proxy strategy with density-based search space compression and transfer learning, MFTune cuts Spark SQL query latency by up to 69% compared to state-of-the-art baselines.

What Problem Does This Paper Address?

Modern big data pipelines rely heavily on Spark SQL, but out-of-the-box performance is rarely optimal. Tuning its 200+ configuration knobs (governing memory management, shuffle partitioning, and executor allocation) is a massive challenge because evaluating a single configuration on a multi-hundred-gigabyte workload can take hours or even days.

Standard Multi-Fidelity Optimization (MFO) techniques try to speed this up by using cheaper, lower-fidelity proxies—such as running the tuning tasks on a downscaled data volume or stopping poorly performing runs early. However, the authors demonstrate that these generic proxies fail for Spark SQL. Reducing data volume alters the fundamental behavior of the system; small datasets often fit entirely in memory, completely failing to trigger the true system bottlenecks (like disk spilling or shuffle contention) that occur at full scale.

Fidelity correlation and performance distribution on TPC-DS

Methods

MFTune introduces a specialized multi-fidelity architecture tailored specifically to the characteristics of database queries and distributed execution engines:

  1. Query-Based Fidelity Partitioning: Instead of shrinking the data volume, MFTune selects a representative subset of queries from the total workload. It employs a greedy algorithm to find a subset that maintains a high performance-ranking correlation with the full workload while drastically reducing execution time.
  2. Density-Based Search Space Compression: To safely navigate the massive 200+ knob space, MFTune uses SHAP (SHapley Additive exPlanations) values to identify which knob values actively reduce latency. It then applies Kernel Density Estimation (KDE) to model these promising regions probabilistically, allowing it to compress continuous and categorical knob ranges without being overly sensitive to outliers.
  3. Two-Phase Warm Start & Transfer Learning: MFTune leverages historical tuning data from similar tasks (identified via a LightGBM regressor based on workload meta-features). Phase 1 evaluates the absolute best historical configurations at full fidelity immediately. Phase 2 feeds the remaining promising historical configurations into low-fidelity MFO loops, ensuring rapid exploration without wasting the time budget.
Figure 2: Overview: architecture and workflow of MFTune.

Datasets

The authors evaluated MFTune using industry-standard benchmarks across eight distinct hardware scenarios:

  • TPC-H: A decision support benchmark consisting of 22 business-oriented ad-hoc queries.
  • TPC-DS: A highly complex benchmark with 99 queries evaluating data warehousing workflows.
  • Both benchmarks were evaluated at 100GB and 600GB scales.
  • DSB (Data Intelligence System Benchmark): Used specifically to evaluate the framework's robustness under controlled workload shifts and query drift.

Key Insights and Ideas

  • Data Reduction is a Trap for Databases: In machine learning, training on 10% of a dataset often mirrors training on 100%. In distributed databases, a 10% data reduction changes the physical execution plan and system bottlenecks entirely.
  • Queries as the Unit of Fidelity: Selecting a smart subset of queries preserves system bottlenecks much better than downscaling data. As shown in the paper's experiments, MFTune’s query selection maintains a reliable Kendall-tau correlation (>0.8) with full-fidelity performance even at extremely low fidelity levels.
  • Continuous Range Compression via KDE: Traditional range pruning uses rigid boundaries or buckets, which risk cutting off optimal configurations near the edges. Treating promising regions as continuous probability distributions via KDE allows the tuner to smooth out historical noise and safely explore nearby, underexplored values.

Key Results

  • Higher Exploration Efficiency: Within a strict 48-hour budget, MFTune successfully evaluated 43 configurations using MFO, whereas a standard full-fidelity approach managed only 29 evaluations (with many resulting in execution errors or high latencies).
  • Significant Latency Reductions: MFTune consistently outperformed six state-of-the-art baselines (including Tuneful, LOFTune, and BOHB), yielding a 25.9% to 43.1% latency reduction on TPC-H and a 37.8% to 69.3% latency reduction on TPC-DS.
  • Excellent Generalization: The framework proved highly robust under cross-benchmark transfers, hardware migrations, and even "cold-start" scenarios where no prior historical tuning data was available.

Limitations and Future Work

  • Initial Full-Fidelity Dependence on New Workloads: Query-based fidelity partitioning relies on query correspondence across tasks. If a completely new workload with zero query overlap is introduced, MFTune cannot activate its low-fidelity proxy immediately. It must fall back to full-fidelity evaluations until enough target observations are gathered to dynamically build a proxy subset online.
  • Future Directions: The authors suggest extending MFTune to handle highly dynamic streaming workloads and exploring ways to mitigate severe multi-tenant noise in shared cloud environments.

Summary updated

BibTeX
@misc{xu2026mftune,
  author = {Beicheng Xu and Lingching Tung and Yuchen Wang and Yupeng Lu and Bin Cui},
  title = {{MFTune: An Efficient Multi-fidelity Framework for Spark SQL Configuration Tuning}},
  year = {2026},
  eprint = {2603.16450},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.16450},
}
Figure