DOI QR코드

DOI QR Code

Performance Optimization Strategies for Fully Utilizing Apache Spark

아파치 스파크 활용 극대화를 위한 성능 최적화 기법

  • 명노영 (고려대학교 컴퓨터학과) ;
  • 유헌창 (고려대학교 컴퓨터학과) ;
  • 최수경 (고려대학교 정보창의교육연구소)
  • Received : 2017.08.07
  • Accepted : 2017.08.22
  • Published : 2018.01.31

Abstract

Enhancing performance of big data analytics in distributed environment has been issued because most of the big data related applications such as machine learning techniques and streaming services generally utilize distributed computing frameworks. Thus, optimizing performance of those applications at Spark has been actively researched. Since optimizing performance of the applications at distributed environment is challenging because it not only needs optimizing the applications themselves but also requires tuning of the distributed system configuration parameters. Although prior researches made a huge effort to improve execution performance, most of them only focused on one of three performance optimization aspect: application design, system tuning, hardware utilization. Thus, they couldn't handle an orchestration of those aspects. In this paper, we deeply analyze and model the application processing procedure of the Spark. Through the analyzed results, we propose performance optimization schemes for each step of the procedure: inner stage and outer stage. We also propose appropriate partitioning mechanism by analyzing relationship between partitioning parallelism and performance of the applications. We applied those three performance optimization schemes to WordCount, Pagerank, and Kmeans which are basic big data analytics and found nearly 50% performance improvement when all of those schemes are applied.

분산 처리 플랫폼에서 다양한 빅 데이터 처리 어플리케이션들의 수행 성능 향상에 대한 관심이 높아지고 있다. 이에 따라 범용적인 분산 처리 플랫폼인 아파치 스파크에서 어플리케이션들의 처리 성능 최적화에 대한 연구들이 활발하게 진행되고 있다. 스파크에서 데이터 처리 어플리케이션들의 수행 성능을 향상시키기 위해서는 스파크의 분산처리모델인 Directed Acyclic Graph(DAG)에 알맞은 형태로 어플리케이션을 최적화시켜야 하고 어플리케이션의 처리 특징을 고려하여 스파크 시스템 파라미터들을 설정해야 하기 때문에 매우 어렵다. 기존 연구들은 각각의 어플리케이션의 처리 성능에 영향을 주는 하나의 요소에 대한 부분적인 연구를 수행했고, 최종적으로 어플리케이션의 성능개선을 이뤄냈지만 스파크의 전반적인 처리과정을 고려한 성능 최적화를 다루지 않았을 뿐만 아니라 처리성능과 상관관계를 갖는 다양한 요소들의 복합적인 상호작용을 고려하지 못했다. 본 연구에서는 스파크에서 일반적인 데이터 처리 어플리케이션의 수행 과정을 분석하고, 분석된 결과를 토대로 어플리케이션의 처리과정 중 스테이지 내부와 스테이지 사이에서 성능 향상을 위한 처리 전략을 제안한다. 또한 스파크의 시스템 설정 파라미터 중 분산 병렬처리와 밀접한 관계를 갖는 파티션 병렬화에 따른 어플리케이션의 수행성능을 분석하고 적합한 파티셔닝 최적화 기법을 제안한다. 3가지 성능 향상 전략의 실효성을 입증하기 위해 일반적인 데이터 처리 어플리케이션: WordCount, Pagerank, Kmeans에 각각의 방법을 사용했을 때의 성능 향상률을 제시한다. 또한 제안한 3가지 성능 최적화 기법들이 함께 적용될 때 복합적인 성능향상 시너지를 내는지를 확인하기 위해 모든 기법들이 적용됐을 때의 성능 향상률을 제시함으로써 본 연구에서 제시하는 전략들의 실효성을 입증한다.

Keywords

References

  1. J. Dean and S. Ghemawat, "MapReduce: Simplified data processing on large clusters," In Proc. USENIX OSDI , 2004.
  2. M. Zaharia, M. Chowdhury, M. J. Franklin, S. Shenker, and I. Stoica, "Spark: Cluster computing with working sets," In Proc. USENIX Hot- Cloud, 2010.
  3. "Apache Flink" [Internet], http://flink.apache.org
  4. "Spark Streaming" [Internet], https://spark.apache.org/ streaming/
  5. "Spark SQL" [Internet], https://spark.apache.org/sql/
  6. S. Venkataraman et al., "Ernest: Efficient Performance Prediction for Large-Scale Advanced Analytics," in Proceedings of the 13th USENIX conference on Networked Systems Design and Implementation, 2016.
  7. W. D. Hillis and G. L. Steele Jr, "Data parallel algorithms," Communications of the ACM, Vol.29, No.12, pp. 1170-1183, 1986. https://doi.org/10.1145/7902.7903
  8. J. Dean et al., "Large scale distributed deep networks," Advances in Neural Information Processing Systems, pp. 1223-1231, 2012.
  9. M. Isard et al., "Dryad: distributed data-parallel programs from sequential building blocks," in ACM SIGOPS Operating Systems Review, pp.59-72, 2007.
  10. M. Zaharia et al., "Resilient distributed datasets: A faulttolerant abstraction for in-memory cluster computing," in Proceedings of the 9th USENIX Conference on Networked Systems Design and Implementation, pp. 2-2, 2012.
  11. A. Alexandrov et al., "MapReduce and PACT - comparing data parallel programming models," in Proceedings of the 14th Conference on Database Systems for BTW. Bonn, Germany: GI, pp. 25-44, 2011.
  12. J. Shi et al., "Clash of the titans: Mapreduce vs. spark for large scale data analytics," Proc. VLDB Endow., Vol.8, pp. 2110-2121, Sep., 2015.
  13. D. Warneke and O. Kao, "Exploiting dynamic resource allocation for efficient parallel data processing in the cloud," IEEE Trans. Parallel Distrib. Syst., Vol.22, No.6, pp.985-997, Jun., 2011. https://doi.org/10.1109/TPDS.2011.65
  14. M. Armbrust et al., "Scaling spark in the real world: The performance and usability," Proc. VLDB Endow., Vol.8, pp. 1840-1843, Aug., 2015. https://doi.org/10.14778/2824032.2824080
  15. A. Alexandrov et al., "The stratosphere platform for big data analytics," The VLDB Journal, Vol.23, No.6, pp.939-964, Dec., 2014. https://doi.org/10.1007/s00778-014-0357-y
  16. E. Yildirim and T. Kosar, "Network-aware end-to-end data throughput optimization," in Proceedings of the First International Workshop on Network-aware Data Management, NY, USA, pp.21-30, 2011.
  17. T. J. Hacker et al., "Adaptive data block scheduling for parallel tcp streams," in HPDC-14. Proceedings. 14th IEEE International Symposiu on HPDC., pp.265-275, 2005.
  18. H. Li et al., "Tachyon: Reliable, memory speed storage for cluster computing frameworks," in Proceedings of the ACM Symposium on Cloud Computing, ser. SOCC. New York: ACM, pp.6:1-6:15, 2014.
  19. J. Cieslewicz and K. A. Ross. "Data partitioning on chip multiprocessors," In Proc. ACM Data Management on New Hardware, 2008.
  20. C. Selvakumar, G. J. Rathanam, and M. R. Sumalatha. "Pdds - improving cloud data storage security using data partitioning technique," In Proc. IEEE International Advance Computing Conference, 2013.
  21. R. Nehme and N. Bruno, "Automated partitioning design in parallel database systems," In Proc. ACM SIGMOD, 2011.
  22. A. Pavlo, C. Curino, and S. Zdonik, "Skew-aware automatic database partitioning in shared-nothing, parallel oltp systems," In Proc. ACM SIGMOD, 2012.
  23. R. Chen, J. Shi, Y. Chen, and H. Chen, "Powerlyra: Differentiated graph computation and partitioning on skewed graphs," In Proc. ACM EuroSys., 2015.
  24. J. E. Gonzalez, R. S. Xin, A. Dave, D. Crankshaw, M. J. Franklin, and I. Stoica. "Graphx: Graph processing in a distributed dataflow framework," In Proc. USENIX OSDI , 2014.
  25. O. Marcu, A. Costan, G. Antoniu, and M. Perez-Hernandez, "Spark versus flink: Understanding the performance in big data analytics frameworks," In Proc. IEEE Custer, 2016.
  26. A. Paul, W. Zhuang, L. Xu, M. Li, M. Rafique, and A. Butt, "CHOPPER: Optimizing Data Partitioning for In-memory Data Analytics Frameworks," In Proc. IEEE Cluster, 2016.