[论文解读] Stubby: A Transformation-based Optimizer for MapReduce Workflows
Stubby 是一种基于转换的、成本驱动的 MapReduce 工作流优化器,通过使用计划到计划的转换系统性地探索全面的计划空间,生成高度优化的工作负载。它通过支持垂直和水平打包、配置调优以及基于可用元数据的接口无关优化,实现了高达 4.5 倍的性能加速,适用于多种工作流生成工具和数据环境。
There is a growing trend of performing analysis on large datasets using workflows composed of MapReduce jobs connected through producer-consumer relationships based on data. This trend has spurred the development of a number of interfaces--ranging from program-based to query-based interfaces--for generating MapReduce workflows. Studies have shown that the gap in performance can be quite large between optimized and unoptimized workflows. However, automatic cost-based optimization of MapReduce workflows remains a challenge due to the multitude of interfaces, large size of the execution plan space, and the frequent unavailability of all types of information needed for optimization. We introduce a comprehensive plan space for MapReduce workflows generated by popular workflow generators. We then propose Stubby, a cost-based optimizer that searches selectively through the subspace of the full plan space that can be enumerated correctly and costed based on the information available in any given setting. Stubby enumerates the plan space based on plan-to-plan transformations and an efficient search algorithm. Stubby is designed to be extensible to new interfaces and new types of optimizations, which is a desirable feature given how rapidly MapReduce systems are evolving. Stubby's efficiency and effectiveness have been evaluated using representative workflows from many domains.
研究动机与目标
- 为解决由于庞大的计划空间、多样的接口以及元数据不完整导致的 MapReduce 工作流自动、基于成本的优化挑战。
- 设计一种通用优化器,可在多种工作流生成接口(如编程接口、Pig、Hive 和查询语言)之间通用工作,而无需完整信息。
- 即使关键元数据(如模式、过滤条件、分区)缺失,也能通过动态限制计划空间以仅保留有效转换,实现有效优化。
- 支持新优化类型和接口的可扩展性,以适应 MapReduce 系统的快速演进。
- 证明在全面计划空间上基于转换的搜索可显著提升基线工作流的性能。
提出的方法
- Stubby 通过建模垂直打包(合并生产者-消费者作业间的 map 和 reduce 函数)、水平打包(为相同数据集共享 I/O)和配置调优(分区、压缩、并行度)等转换,构建了 MapReduce 工作流的全面计划空间。
- 它采用基于转换的搜索策略,通过对现有计划应用原子转换生成新计划,从而实现对计划空间的系统性探索。
- 优化器采用基于成本的评估模型,利用可用元数据(如过滤条件、模式注释和数据集统计信息)估算执行成本,同时在信息缺失时避免无效转换。
- Stubby 通过排除需要不可用信息的转换(例如,缺少模式注释时禁止垂直打包)动态剪枝计划空间,确保正确性和效率。
- 它集成了高效的搜索算法,优先考虑高影响力转换并避免穷举枚举,专注于近似最优解。
- 该系统设计为中间件层,独立于底层 MapReduce 引擎且与工作流生成器分离,从而实现广泛的兼容性。
实验结果
研究问题
- RQ1在元数据不完整的情况下,基于成本的优化器能否有效探索大规模、多维的 MapReduce 工作流计划空间,同时保持效率和正确性?
- RQ2如何设计一种基于转换的优化器,使其在无需特定接口逻辑的情况下,可扩展支持多种工作流生成接口(如 Pig、Hive、编程接口)?
- RQ3在真实世界的 MapReduce 工作流中,垂直打包和水平打包转换在减少 I/O 和执行时间方面能实现多大程度的优化?
- RQ4当关键元数据(如模式、过滤条件)缺失或部分可用时,优化器的性能如何变化?
- RQ5通用优化器能否在多种真实世界数据处理工作负载中实现显著的性能提升?
主要发现
- 在涵盖多个领域代表性工作负载的全面实验中,Stubby 在基线工作流上实现了高达 4.5 倍的性能加速。
- 当元数据缺失时,优化器通过排除无效转换有效剪枝了计划空间,确保了正确性且未牺牲性能。
- 垂直打包——即合并跨作业的 map 和 reduce 函数——是性能提升的主要贡献因素,尤其在存在高洗牌开销的工作流中表现显著。
- 水平打包减少了大型数据集的冗余 I/O,尤其在多个作业处理相同输入的工作流中效果明显。
- 该系统在不同接口(包括 Pig、Hive 和编程接口)上表现出强大的可扩展性和适应性,无需重新配置。
- 即使缺乏完整统计信息,基于成本的转换引擎仍成功识别出近似最优计划,优于基于规则和计划空间受限的方法。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。