计算机与现代化 ›› 2021, Vol. 0 ›› Issue (10): 49-56.

• 软件工程 • 上一篇    下一篇

一种基于深度强化学习的Spark Streaming参数优化方法

  

  1. (1.贵州大学计算机科学与技术学院,贵州贵阳550025;2.贵州省软件工程与信息安全特色重点实验室,贵州贵阳550025;
    3.科大讯飞股份有限公司,安徽合肥230011)
  • 出版日期:2021-10-14 发布日期:2021-10-14
  • 作者简介:刘露(1996—),女,贵州贵阳人,硕士研究生,研究方向:大数据安全,E-mail: gzuliulu@163.com; 通信作者:申国伟(1986—),男,湖南邵东人,副教授,硕士生导师,博士,研究方向:网络与信息安全,大数据,E-mail: gwshen@gzu.edu.cn; 郭春(1986—),男,湖南邵阳人,副教授,硕士生导师,博士,研究方向:网络与信息安全,E-mail: E-mail: gc_gzedu@163.com; 崔允贺(1987—),男,山东济宁人,副教授,硕士生导师,博士,研究方向:SDN,网络安全,E-mail: yhcui@gzu.edu.cn; 蒋朝惠(1965—),男,四川广安人,教授,硕士生导师,硕士,研究方向:网络与信息安全,E-mail: jiangchaohui@126.com; 伍大勇(1977—),男,黑龙江牡丹江人,高级工程师,博士,研究方向:自然语言处理,数据挖掘,E-mail: dywu2@iflytek.com。
  • 基金资助:
    国家自然科学基金资助项目(62062022); 贵州省科学技术基金资助项目(黔科合基础[2017]1051); 国家重点研发计划项目(2018YFC0807701)

A Spark Streaming Parameter Optimization Method Based on Deep Reinforcement Learning

  1. (1. College of Computer Science and Technology, Guizhou University, Guiyang 550025, China;
    2. Guizhou Provincial Key Laboratory of Software Engineering and Information Security, Guiyang 550025, China;
    3. Iflytek Co., Ltd., Hefei 230011, China)
  • Online:2021-10-14 Published:2021-10-14

摘要: Spark Streaming作为主流的开源分布式流分析框架,性能优化是目前的研究热点之一。在Spark Streaming性能优化中,业务场景下的配置参数优化是其性能提升的重要因素。在Spark Streaming系统中,可配置的参数有200多个,对参数调优人员的经验要求较高,未经优化的参数配置会影响流作业执行性能。因此,针对Spark Streaming的参数配置优化问题,提出一种基于深度强化学习的Spark Streaming参数优化方法(DQN-SSPO),将Spark Streaming参数优化配置问题转化为深度强化学习模型训练中的最大回报获得问题,并提出权重状态空间转移方法来增加模型训练获得高反馈奖励的概率。在3种典型的流分析任务上进行实验,结果表明经参数优化后Spark Streaming上的流作业性能在总调度时间上平均缩减27.93%,在总处理时间上平均缩减42%。

关键词: Spark Streaming, 性能优化, 深度强化学习, 参数调优

Abstract: Spark Streaming is the mainstream open source distributed stream analysis framework, and its performance optimization is one of the current research hotspots. In Spark Streaming performance optimization, configuration parameter optimization in business scenarios is an important factor in its performance improvement. In the Spark Streaming system, there are more than 200 configurable parameters, which requires high experience for parameter tuning personnel. Non optimized parameter configuration will affect the execution performance of streaming jobs. Therefore, in view of the parameter configuration optimization problem of Spark Streaming, a Spark Streaming parameter optimization method based on deep reinforcement learning (DQN-SSPO) is proposed, which converts the parameter optimization configuration problem of Spark Streaming into the problem of obtaining the maximum return in deep reinforcement learning model training, and a weighted state space transfer method is proposed to increase the probability of high feedback rewards for model training. Experiments on three typical streaming analysis tasks show that the performance of streaming jobs on Spark Streaming after parameter optimization is reduced by 27.93% in total scheduling time and 42% in total processing time.

Key words: Spark Streaming, performance optimization, deep reinforcement learning, parameter tuning