Abstract
Iterative MapReduce extends the classic MapReduce paradigm by introducing loops as first-class programming constructs. This allows for native support of machine learning workloads, enabling optimizations like data caching and automated resource tuning. This paper presents a cost-based optimizer that automatically configures cluster parameters, such as aggregation tree structures and partitioning, to achieve performance comparable to specialized ML systems.
Introduction
MapReduce frameworks like Hadoop revolutionized big data processing but struggle with the iterative nature of machine learning (ML) algorithms. Algorithms like gradient descent require repeated passes over the same data to update a model. Currently, developers are forced to write external driver scripts that loop MapReduce jobs, which is highly inefficient due to repeated data reading from disk and task rescheduling. Furthermore, manual tuning of cluster resources in elastic environments is nearly impossible for human developers.
Methods and Architecture
The authors introduce three core operators—MapReduce, Sequential, and Loop—to elevate iteration within the programming model. Built on the Hyracks engine, the runtime can optimize the entire iterative program by caching immutable training data in memory and maintaining task locality across loops.
A central component is a cost-based optimizer that determines the best physical execution plan. It models two key decisions:
- Aggregation Tree Structure: Determining the optimal "fan-in" for the reduce phase. The authors theoretically prove that the fastest fan-in is Euler's number ($e \approx 2.718$), which empirically translates to a constant of 4 or 5, regardless of cluster scale.
- Data Partitioning: Calculating the optimal number of machines ($N$). The optimizer balances wall-clock time against compute cost, deciding whether to hold all data in memory or allow some disk spilling to save resources.
Evaluation
The system was evaluated using a massive Yahoo! Research advertisement dataset containing over 2.3 billion records (492 GB in text format).
Key Results
On a 120-CPU cluster, the optimized Iterative MapReduce plan achieved an average iteration time of 114.54 seconds, outperforming the specialized Vowpal Wabbit (VW) system, which took 124.41 seconds.
As shown in Figure 5, the optimizer accurately predicts resource trade-offs. For a 100GB subset, using 120 CPUs minimizes response time (blue bars), but using exactly 24 CPUs minimizes the overall compute cost (red bars). This demonstrates that "more machines" are not always the most efficient choice.
Conclusion
By abstracting loops into the system architecture, distributed ML can benefit from automated query optimization. While the current model assumes linear scaling and does not yet account for fault tolerance, it provides a robust framework for high-performance, large-scale iterative computation.
Summary updated