作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• 先进计算与数据处理 • 上一篇    下一篇

基于内存与文件共享机制的Spark I/O性能优化

黄廷辉,王玉良,汪振,崔更申   

  1. (桂林电子科技大学 计算机科学与信息安全学院,广西 桂林 541004)
  • 收稿日期:2016-01-19 出版日期:2017-03-15 发布日期:2017-03-15
  • 作者简介:黄廷辉(1970—),男,副教授、硕士,主研方向为分布式计算、物联网;王玉良、汪振、崔更申,硕士。
  • 基金资助:
    国家自然科学基金(61363029);赛尔网络下一代互联网技术创新计划项目(NGII20160306)。

Spark I/O Performance Optimization Based on Memory and File Sharing Mechanism

HUANG Tinghui,WANG Yuliang,WANG Zhen,CUI Gengshen   

  1. (School of Computer Science and Information Security,Guilin University of Electronic Technology,Guilin,Guangxi 541004,China)
  • Received:2016-01-19 Online:2017-03-15 Published:2017-03-15

摘要:

通过对Spark采用的弹性分布式数据集及任务调度等关键技术进行分析,发现数据处理I/O时间是影响Spark计算性能的主要瓶颈。为此,研究Spark合并文件运行模式,该模式能够减少缓存文件数量,提高Spark的I/O效率,但存在内存开销较高的缺点。在此基础上,给出改进的Spark Shuffle过程,即通过设计一种使每个Mapper只生成一个缓存文件的运行模式,并且每个Mapper共享同一个内存缓冲区,从而提高I/O效率和减少内存开销。仿真结果表明,与Spark默认模式相比,该运行模式宽依赖计算过程的I/O时间缩短42.9%,可有效提高内存利用率和Spark平台运算效率。

关键词: 分布式计算, Spark平台, Shuffle过程, 磁盘I/O, 任务调度

Abstract: Based on the analysis of the key technologies of Spark,such as flexible distributed data set and Spark task scheduling,it is concluded that time of I/O in data processing has a great effect on the computing performance of Spark. Aiming at this problem,this paper studies the run mode of Spark consolidating files that can reduce the number of cache files and improve the I/O efficiency of Spark to some extent,but it still has the disadvantage of high memory cost. Further more,the paper proposes an improved process of Spark Shuffle which designs a mode that every Mapper only generates one cache file,and every Mapper’s bucket shares the same memory buffer,thus these improve I/O efficiency and reduce the memory overhead. Simulation results show that,compared with the default mode of Spark,the I/O time of a wide dependent process is shortened by 42.9%,which improves the memory utilization and the efficiency of the Spark platform.

Key words: distributed computing, Spark platform, Shuffle process, disk I/O, task scheduling

中图分类号: