Distributed data analytic engines like Spark are common choices to process massive data in industry. However, the performance of Spark SQL highly depends on the choice of configurations, where the optimal ones vary with the executed workloads. Among various alternatives for Spark SQL tuning, Bayesian optimization (BO) is a popular framework that finds near-optimal configurations given sufficient budget, but it suffers from the re-optimization issue and is not practical in real production. When applying transfer learning to accelerate the tuning process, we notice two domain-specific challenges: 1) most previous work focus on transferring tuning history, while expert knowledge from Spark engineers is of great potential to improve the tuning performance but is not well studied so far; 2) history tasks should be carefully utilized, where using dissimilar ones lead to a deteriorated performance in production. In this paper, we present Rover, a deployed online Spark SQL tuning service for efficient and safe search on industrial workloads. To address the challenges, we propose generalized transfer learning to boost the tuning performance based on external knowledge, including expert-assisted Bayesian optimization and controlled history transfer. Experiments on public benchmarks and real-world tasks show the superiority of Rover over competitive baselines. Notably, Rover saves an average of 50.1% of the memory cost on 12k real-world Spark SQL tasks in 20 iterations, among which 76.2% of the tasks achieve a significant memory reduction of over 60%.
翻译:分布式数据分析引擎(如Spark)是工业界处理海量数据的常见选择。然而,Spark SQL的性能高度依赖于配置的选择,而最优配置随执行工作负载的不同而变化。在众多Spark SQL调优方案中,贝叶斯优化(BO)是一种能够在充足预算下找到近似最优配置的流行框架,但它存在重新优化问题,在实际生产中难以实用。当应用迁移学习加速调优过程时,我们注意到两个领域特定的挑战:1)以往研究大多关注迁移调优历史,而Spark工程师的专家知识在提升调优性能方面具有巨大潜力,但尚未得到充分研究;2)历史任务需要谨慎使用,使用不相似的历史任务会导致生产环境性能下降。本文提出Rover,一种部署在工业工作负载上的在线Spark SQL调优服务,旨在实现高效且安全的搜索。为应对这些挑战,我们提出基于外部知识的广义迁移学习来提升调优性能,包括专家辅助贝叶斯优化和受控历史迁移。在公开基准测试和实际任务上的实验表明,Rover优于竞争基线方法。值得注意的是,Rover在20次迭代中对1.2万个实际Spark SQL任务平均节省50.1%的内存成本,其中76.2%的任务实现了超过60%的显著内存缩减。