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

OneStopTuner: An End to End Architecture for JVM Tuning of Spark Applications

Venktesh V, Pooja B. Bindal, Devesh Singhal, A. V. Subramanyam, Vivek KumararXiv 2020 · OpenReview

Abstract

Java is the backbone of widely used big data frameworks, such as Apache Spark, due to its productivity, portability from JVM-based execution, and support for a rich set of libraries. However, the performance of these applications can widely vary depending on the runtime flags chosen out of all existing JVM flags. Manually tuning these flags is both cumbersome and error-prone. Automated tuning approaches can ease the task, but current solutions either require considerable processing time or target a subset of flags to avoid time and space requirements. In this paper, we present OneStopTuner, a Machine Learning based novel framework for autotuning JVM flags. OneStopTuner controls the amount of data generation by leveraging batch mode active learning to characterize the user application. Based on the user-selected optimization metric, OneStopTuner then discards the irrelevant JVM flags by applying feature selection algorithms on the generated data. Finally, it employs sample efficient methods such as Bayesian optimization and regression guided Bayesian optimization on the shortlisted JVM flags to find the optimal values for the chosen set of flags. We evaluated OneStopTuner on widely used Spark benchmarks and compare its performance with the traditional simulated annealing based autotuning approach. We demonstrate that for optimizing execution time, the flags chosen by OneStopTuner provides a speedup of up to 1.35x over default Spark execution, as compared to 1.15x speedup by using the flag configurations proposed by simulated annealing. OneStopTuner was able to reduce the number of executions for data-generation by 70% and was able to suggest the optimal flag configuration 2.4x faster than the standard simulated annealing based approach, excluding the time for data-generation.

Introduction

Tuning the Java Virtual Machine (JVM) is often considered a "black art." For big data frameworks like Apache Spark, the performance stakes are high, but the complexity is even higher. With nearly 700 configuration flags available in modern OpenJDK versions, finding the optimal combination for a specific workload is a significant challenge. Manual tuning is impractical, and existing automated tools often suffer from excessive execution time or overly narrow search spaces. OneStopTuner addresses these issues by providing a sample-efficient, modular framework to explore the full breadth of JVM flags without prohibitive time costs.

System Architecture and Methodology

OneStopTuner employs a three-stage machine learning pipeline to automate the tuning process, treating the JVM as a black box while efficiently narrowing the search space.

The OneStopTuner architecture consists of three main stages: Data Generation, Important Flags Selection, and Optimization.

1. Application Characterization (Active Learning)

Instead of relying on random configurations, the framework utilizes Batch-mode Expected Model Change Maximization (BEMCM). This active learning approach selects configurations expected to provide the highest information gain, allowing the system to characterize application behavior with minimal trial runs.

2. Feature Selection (Lasso Regression)

To manage the high dimensionality of the search space, OneStopTuner applies Lasso Regression to the generated data. Lasso's sparsity-inducing property effectively "zeroes out" irrelevant flags, narrowing the focus to approximately 100 of the most impactful parameters for the user's chosen metric.

3. Optimization

On the shortlisted flags, the tool employs advanced variants of Bayesian Optimization (BO):

  • BO with Warm Start: Reuses data from the active learning phase to jumpstart the optimization process.
  • Regression Guided BO (RBO): Uses a linear regression model as a proxy to predict performance, potentially speeding up the tuning process by up to 6x compared to running actual Spark jobs for every iteration.
The user interface allows for the selection of tuning metrics, GC modes, workloads, and optimization methods.

Experimental Evaluation

The framework was evaluated using the HiBench suite on a local cluster of three nodes (60 cores total, 90GB RAM per node). Two computationally diverse workloads were prioritized:

  • Latent Dirichlet Allocation (LDA): A memory-intensive topic modeling algorithm.
  • Dense K-Means: A clustering algorithm characterized by high task parallelism.

Key Results

OneStopTuner demonstrated significant improvements in both performance and efficiency:

  • Performance Gains: The framework achieved a 1.35x speedup for DenseKMeans and a 1.28x speedup for LDA compared to default Spark settings. This outperformed traditional Simulated Annealing (SA), which only reached a 1.15x speedup.
  • Tuning Efficiency: Optimal configurations were suggested 2.4x faster than SA-based approaches. Furthermore, the active learning component reduced the number of executions required for data generation by 70%.
  • Resource Optimization: Beyond execution time, the tool improved heap usage by up to 50%, offering potential reductions in cloud infrastructure costs.

Conclusion

OneStopTuner provides a robust, end-to-end solution for the complex task of JVM tuning in big data environments. By leveraging active learning and feature selection, it overcomes the time-and-space bottlenecks of traditional autotuning. Future work will focus on multi-objective optimization to balance trade-offs between memory footprint and execution speed, as well as extending the framework to non-linear feature selection methods and other JVM-based runtimes.

Summary updated

BibTeX
@misc{v2020onestoptuner,
  author = {Venktesh V and Pooja B. Bindal and Devesh Singhal and A. V. Subramanyam and Vivek Kumar},
  title = {{OneStopTuner: An End to End Architecture for JVM Tuning of Spark Applications}},
  year = {2020},
  eprint = {2009.06374},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2009.06374},
}
Figure