梁毅 刘飞 常仕禄



摘 要:Spark Streaming是一种典型的批量流式计算平台,可用于处理持续到达的数据流。流式数据最重要的两个特征是波动性和时效性。利用动态调整系统参数和动态调整资源满足不同数据到达速率的响应延迟,但调整参数的方式具有局限性,其用户成本较大。因此提出一种参数和资源协同调整策略,采用动态邻域粒子群算法找到一种满足SLO目标且使用资源最少的系统方案。实验表明,AdaStreaming与DyBBS相比,延迟性降低了70.1%,在资源使用量上比DRA降低了42.1%。
关键词:Spark Streaming; 动态邻域粒子群;参数配置;资源分配
DOI:10. 11907/rjdk. 181652
中图分类号:TP301文献标识码:A文章编号:1672-7800(2019)001-0045-03
Abstract:Spark Streaming is a typical batched streaming processing system that can be used to process continuously arriving data streams. The two most important characteristics of streaming data are its volatility and timeliness. The method of dynamical parameter configuration and dynamical resource allocation are proposed to guarantee the end to end latency with different data arrival rates. However, the method of dynamical parameter configuration has limitation on scope of application, and the method of dynamical resource allocation will bring greater cost to users. Therefore, this paper proposes a parameter and resource coordination adjustment strategy, using dynamic neighborhood particle swarm algorithm to find a solution that can achieve resource minimization on the premise of meeting the SLO goal. Experiments show that AdaStreaming reduced latency by 59% against DyBBS, and reduced the amount of resources by 34% against DRA.
0 引言
随着大数据应用场景的多样化,各种行业产生了海量流式数据[1-3]。流式数据最重要的两个特征是波动性和时效性,不同时刻流式数据到达的速率是波动的,且需在一定时间内完成处理[4]。Spark Streaming[5]是一种典型的批量流式计算平台,被工业界和学术界广泛采用。
随着云计算的发展,许多流式计算平台被部署到云上,为用户提供灵活的服务[6]。对于这类部署在云上的Spark Streaming平台,满足用户SLO和最小化资源使用以降低用户成本成为最重要的两个目标[7-8]。现有研究主要从3方面进行优化:①数据丢弃[9-11]。但该方法不适用具有“至少执行一次”语义保证的应用;②动态调整参数配置[12-13]。然而,当数据速率激增时,当前资源分配情况下可能出现调整参数无法使延迟满足需求的情况;③动态调整资源。当数据处理落后于数据流入时,会增加分配的资源数量以提升数据处理速率[14]。……