Abstract
Predicting resource requirements for MapReduce jobs is critical for efficient cloud infrastructure management. This paper proposes a statistical regression model to estimate total cumulative CPU usage (in clock cycles) based on configuration parameters like the number of mappers and reducers. Using polynomial regression, the authors demonstrate prediction errors below 8% across various benchmarks, offering a robust metric for cross-platform resource budgeting.
Introduction
In the landscape of cloud computing, leasing infrastructure is a complex balancing act. Under-provisioning resources can lead to job failures or significant performance degradation in tasks like large-scale data mining or spam detection. Conversely, over-provisioning results in unnecessary financial expenditure. Currently, the responsibility of selecting optimal configurations—specifically the number of mappers and reducers—rests with the user.
While existing literature often focuses on predicting execution time, this research argues that understanding total CPU usage, measured in clock cycles, is more vital for budgeting and resource allocation in virtualized environments. MapReduce performance is heavily influenced by these configuration "knobs," making accurate pre-deployment prediction a high-value goal.
The MapReduce Framework
To understand the prediction challenge, one must consider the standard MapReduce workflow. The process typically involves splitting input data, processing it through a Map phase, and then aggregating results in a Reduce phase.
As illustrated in Figure 1, the data undergoes several transformations. The authors note that while their current model treats the entire job as a single entity, the distinct characteristics of the Map and Reduce phases suggest that future iterations could benefit from modeling these stages independently.
Methodology
The authors propose a "profile-then-predict" approach consisting of four main steps:
- Profiling: Running applications multiple times with varying numbers of mappers ($M$) and reducers ($R$) to generate training data.
- Metric Selection: Utilizing total CPU clock cycles as a "portable" metric. Unlike time, total work in cycles remains relatively stable regardless of the specific cluster size.
- Polynomial Regression: Applying a two-degree polynomial regression model using the Least Square Regression method to map the relationship between $(M, R)$ and CPU cycles.
- Data Scaling: Identifying a linear relationship between input data size and CPU usage, allowing models trained on small subsets to scale to production-level datasets.
Figure 3 demonstrates the data flow for this profiling stage, where system logs and CPU utilization statistics are captured to inform the regression model's parameters.
Experimental Results
The model was evaluated using three benchmarks: WordCount (computation-heavy), Exim MainLog Parsing (log analysis), and TeraSort (I/O and shuffle intensive). The experiments were conducted on a 20-node virtual Hadoop cluster.
The results showed high accuracy across 30 unseen job configurations:
- WordCount: Mean Absolute Percentage Error (MAPE) of 1.59%.
- Exim MainLog: MAPE of 2.28% and an $R^2$ accuracy of 0.99.
- TeraSort: Due to its higher complexity and I/O volatility, the error rate was slightly higher at 7.26%.
Discussion and Future Work
A key insight from this study is that total CPU usage in clock cycles is largely independent of cluster size, making it an excellent universal metric for cross-platform prediction. Furthermore, the linearity of scale observed with input data allows practitioners to profile jobs cheaply on small data samples.
However, limitations remain. The current "black box" approach does not distinguish between the Map and Reduce phases, which may have different resource signatures. Additionally, while polynomial regression works well for simpler tasks, highly complex applications like TeraSort may require more sophisticated non-linear techniques. Future research will focus on decomposing the model into phase-specific predictions and addressing I/O-bound bottlenecks.
Summary updated