With the development of distributed computing systems, Spark has become widely used in big data parallel processing scenarios. To reduce costs and enhance efficiency, it is essential to make quick and precise adjustments to Spark configuration for each job. Ad hoc Spark SQL job tuning presents unique challenges due to its one-off execution nature, where existing iterative tuning methods for periodic jobs are inapplicable. In this paper, we focus on ad hoc Spark SQL job tuning within Spark executor parameters, which have the most significant influence on processing performance, aiming at improving the quality of service between service providers and clients. We propose a model-assisted reinforcement learning tuning framework, ZTune. ZTune integrates SQL plan representation, a novel query performance model (QPM), and a dual-phase tuning process: prediction and searching. In prediction phase, we combine the constructed model with historical data to better utilize observed patterns and sampling data for more robust performance prediction. In searching phase, we propose a Dual Sampling & Transfer Deep Q-Network to accelerate model training and improve configuration recommendations. Performance evaluation on a large-scale cluster illustrates that ZTune achieves significant performance results compared with baseline methods, including state-of-the-art and industrial approaches, with competitive execution overhead.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

ZTune: Model-Assisted Reinforcement Learning for Executor Tuning on Ad Hoc Spark SQL Query

  • Dejun Kong,
  • Xiuqi Huang,
  • Xiaofeng Gao

摘要

With the development of distributed computing systems, Spark has become widely used in big data parallel processing scenarios. To reduce costs and enhance efficiency, it is essential to make quick and precise adjustments to Spark configuration for each job. Ad hoc Spark SQL job tuning presents unique challenges due to its one-off execution nature, where existing iterative tuning methods for periodic jobs are inapplicable. In this paper, we focus on ad hoc Spark SQL job tuning within Spark executor parameters, which have the most significant influence on processing performance, aiming at improving the quality of service between service providers and clients. We propose a model-assisted reinforcement learning tuning framework, ZTune. ZTune integrates SQL plan representation, a novel query performance model (QPM), and a dual-phase tuning process: prediction and searching. In prediction phase, we combine the constructed model with historical data to better utilize observed patterns and sampling data for more robust performance prediction. In searching phase, we propose a Dual Sampling & Transfer Deep Q-Network to accelerate model training and improve configuration recommendations. Performance evaluation on a large-scale cluster illustrates that ZTune achieves significant performance results compared with baseline methods, including state-of-the-art and industrial approaches, with competitive execution overhead.