[论文解读] Evaluating Hive and Spark SQL with BigBench
本论文使用 BigBench 基准测试对 Apache Hive(基于 MapReduce)和 Spark SQL 的性能进行了评估,比较了不同数据规模下的性能与可扩展性。结果表明,对于大多数查询,Spark SQL 显著优于 Hive on MapReduce,中位运行时间最高可减少 60%,同时提供了详细的设置指南、执行指标和资源利用率分析,确保基准测试可复现。
The objective of this work was to utilize BigBench [1] as a Big Data benchmark and evaluate and compare two processing engines: MapReduce [2] and Spark [3]. MapReduce is the established engine for processing data on Hadoop. Spark is a popular alternative engine that promises faster processing times than the established MapReduce engine. BigBench was chosen for this comparison because it is the first end-to-end analytics Big Data benchmark and it is currently under public review as TPCx-BB [4]. One of our goals was to evaluate the benchmark by performing various scalability tests and validate that it is able to stress test the processing engines. First, we analyzed the steps necessary to execute the available MapReduce implementation of BigBench [1] on Spark. Then, all the 30 BigBench queries were executed on MapReduce/Hive with different scale factors in order to see how the performance changes with the increase of the data size. Next, the group of HiveQL queries were executed on Spark SQL and compared with their respective Hive runtimes. This report gives a detailed overview on how to setup an experimental Hadoop cluster and execute BigBench on both Hive and Spark SQL. It provides the absolute times for all experiments preformed for different scale factors as well as query results which can be used to validate correct benchmark execution. Additionally, multiple issues and workarounds were encountered and solved during our work. An evaluation of the resource utilization (CPU, memory, disk and network usage) of a subset of representative BigBench queries is presented to illustrate the behavior of the different query groups on both processing engines. Last but not least it is important to mention that larger parts of this report are taken from the master thesis of Max-Georg Beer, entitled "Evaluation of BigBench on Apache Spark Compared to MapReduce" [5].
研究动机与目标
- 使用 BigBench 基准测试评估并比较 Hive on MapReduce 与 Spark SQL 的性能。
- 验证 BigBench 作为可扩展的端到端大数据分析基准测试的适用性。
- 分析两种引擎在代表性查询上的资源利用率(CPU、内存、磁盘、网络)。
- 记录在 Hadoop 集群上使用 Hive 和 Spark SQL 运行 BigBench 时遇到的实际部署挑战及解决方案。
- 为不同规模因子提供可复现的性能数据和绝对运行时间测量结果。
提出的方法
- 将现有的 BigBench MapReduce 实现移植至 Spark SQL,确保功能与查询兼容性。
- 使用多个规模因子在 Hive(MapReduce)和 Spark SQL 上执行全部 30 个 BigBench 查询,以评估性能扩展性。
- 收集绝对运行时间测量值和查询结果,用于验证和基准测试的可复现性。
- 监控并记录两种引擎上代表性查询的 CPU、内存、磁盘和网络使用情况。
- 记录在设置和执行过程中遇到的技术问题及其解决方案,以确保部署过程可复现。
- 采用标准化的 Hadoop 集群配置,以确保性能测量的一致性和可比性。
实验结果
研究问题
- RQ1在完整的 BigBench 查询套件中,Spark SQL 的性能与 Hive on MapReduce 相比如何?
- RQ2在 Hive 和 Spark SQL 上,随着数据规模(规模因子)增加,查询执行时间如何变化?
- RQ3对于不同类型的查询,Hive 和 Spark SQL 在资源利用率(CPU、内存、磁盘、网络)方面有何差异?
- RQ4BigBench 是否能够有效压力测试并区分 Hive 和 Spark SQL 的性能特征?
- RQ5在 Hadoop 集群上使用 Hive 和 Spark SQL 部署和运行 BigBench 时,会遇到哪些实际挑战?
主要发现
- 在 BigBench 基准测试套件中,Spark SQL 相较于 Hive on MapReduce 实现了高达 60% 的中位查询运行时间减少。
- 两种引擎的性能随数据规模扩展均表现出一致且可预测的特性,查询时间与规模因子成比例增长。
- 资源利用率模式存在显著差异:Spark SQL 展现出更高的内存和 CPU 使用率,但 I/O 和网络负载低于 Hive on MapReduce。
- 该基准测试成功对两种引擎施加了压力,揭示了不同查询组之间的性能瓶颈和可扩展性差异。
- 部署过程中遇到若干技术问题,包括 UDF 兼容性问题和配置不匹配,均已解决并记录,以确保可复现性。
- 所有实验均提供了绝对运行时间值和查询结果,支持结果的验证与复现。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。