Abstract
Optimizing MapReduce job performance is challenging due to the complex interplay of configuration parameters. This paper proposes an analytical framework using multivariate linear regression to model the relationship between the number of Mappers and Reducers and the total execution time. By profiling applications on specific hardware, the model achieves high predictive accuracy, with median errors under 5% for standard benchmarks.
Introduction
MapReduce remains a cornerstone of large-scale data processing. However, selecting optimal configuration parameters—such as the number of Mapper and Reducer tasks—often relies on heuristics or trial and error. Inaccurate settings can lead to resource underutilization or excessive job runtimes. This research addresses the need for a formal mathematical approach to predict execution time based on these critical parameters, enabling better resource allocation and scheduling in cloud environments.
Methodology
The proposed approach follows a three-stage workflow: profiling, modeling, and prediction.
MapReduce Architecture and Parameters
The framework focuses on the core phases of the MapReduce model: data splitting, mapping, shuffling/sorting, and reducing. The primary variables of interest are the number of Mappers ($N_m$) and Reducers ($N_r$), which dictate how data is partitioned and aggregated across the cluster.
Multivariate Linear Regression Model
To capture the relationship between configuration and runtime, the authors employ multivariate linear regression. The model incorporates higher-order terms (squares and cubes) to account for non-linear performance behaviors. The coefficients are determined using the Least Squares Regression method based on profiled data collected from multiple runs to account for system noise.
Experimental Setup
The model was evaluated using two distinct benchmarks on an 8GB dataset:
- WordCount: A Java-based application for counting word frequencies.
- Exim Mainlog Parsing: A Python-based application using Hadoop Streaming for log analysis.
Experiments were conducted on a dedicated 4-node cluster. Each configuration was executed five times to mitigate the impact of temporal noise, with the mean execution time used for modeling.
Results and Discussion
The model demonstrated high fidelity in predicting execution times across various configurations for both Java and Python-based applications.
Predictive Accuracy
For the WordCount application, the model achieved a remarkably low mean error of 0.92%. The Exim parser, while slightly less predictable due to the overhead of Hadoop Streaming and Python execution, still maintained a low mean error of 2.79%. Overall, the median prediction error remained below 5% for both applications, validating the statistical reliability of the regression approach.
Key Insights
- Performance Signatures: Each application exhibits a unique performance profile. For example, WordCount generally required twice the execution time of the Exim parser for the same data volume, indicating that internal logic complexity is a primary driver of runtime.
- Optimal Configurations: The data identified clear performance "sweet spots," such as 20 Mappers and 5 Reducers for WordCount on the test cluster.
- Platform Sensitivity: The model is hardware-dependent; coefficients must be recalculated if the job is migrated to a different infrastructure to maintain accuracy.
Conclusion
This study provides a robust method for predicting MapReduce job duration based on Mapper and Reducer counts. While highly accurate for recurring production tasks, the model currently treats the system as a "black box" and does not account for other parameters like memory or network bandwidth. Future work may explore non-linear techniques, such as neural networks, to handle more complex environments and a broader set of configuration variables.
Summary updated