Fine-Grained Modeling and Optimization for Intelligent Resource Management in Big Data Processing

Chenghao Lyu, Qi Fan, Fei Song, Arnab Sinha, Yanlei Diao, Wei Chen, Li Ma, Yihui Feng, Yaliang Li, Kai Zeng, Jingren Zhou

Abstract

In large-scale big data processing environments, resource management has traditionally been handled at the stage level, assuming uniform behavior across all parallel instances. However, factors such as data skew and hardware heterogeneity often lead to significant performance variance, creating "stragglers" that delay entire jobs. This paper introduces a fine-grained, instance-level resource management system designed for Alibaba's MaxCompute. By integrating deep learning-based latency prediction with novel placement and resource assignment algorithms, the proposed system optimizes for both performance and cost. Experimental results on production workloads demonstrate a 37-72% reduction in latency and a 43-78% reduction in cloud costs, while maintaining sub-second decision speeds.

1. Introduction

Modern big data systems, such as Alibaba’s MaxCompute, process massive datasets by breaking SQL queries into Directed Acyclic Graphs (DAGs) of stages. Each stage is executed by thousands of parallel instances. Current resource management strategies typically allocate CPU and memory at the stage level. This "one-size-fits-all" approach is increasingly inefficient. Real-world production environments are characterized by data skew, varying hardware capabilities, and fluctuating machine loads. These factors cause some instances to run much longer than others, creating bottlenecks.

To address these inefficiencies, we propose a fine-grained Resource Optimization (RO) framework. The goal is to move beyond stage-level heuristics and make intelligent, instance-specific decisions that balance the trade-off between execution latency and operational cost.

2. System Architecture

The proposed RO system decomposes the complex, NP-hard problem of resource optimization into four manageable components:

2.1 Fine-Grained Modeling (MCI+GTN)

The foundation of the system is a Multi-Channel Input (MCI) model designed for accurate latency prediction. It utilizes Graph Transformer Networks (GTN) to capture the structural information of SQL query plans. This structural data is combined with tabular features, including machine states, hardware specifications, and instance metadata. Unlike previous models that focus solely on query logic, this approach accounts for the physical environment, allowing the system to predict how a specific instance will perform on a specific machine.

2.2 Intelligent Placement Advisor (IPA)

The IPA utilizes the latency model to optimize instance placement. Rather than relying on random or simple heuristic placement, the IPA "match-makes" instances to machines. It identifies predicted stragglers and prioritizes their placement on faster or less-congested hardware, effectively narrowing the variance in instance completion times within a stage.

2.3 Resource Assignment Advisor (RAA)

Following placement, the RAA optimizes the specific resource allocations (CPU and memory) for each instance. It employs a Hierarchical Multi-Objective Optimization (MOO) framework to identify Pareto-optimal configurations. This allows the system to reduce resource waste in short-running instances while boosting resources for critical-path instances to accelerate the overall stage.

2.4 Scalability via Clustering

To operate within the sub-second constraints of a production scheduler, the system employs clustering. By grouping similar instances and machines, the search space for the IPA and RAA is significantly reduced, ensuring that optimization decisions are made in real-time without a substantial loss in accuracy.

3. Experimental Evaluation

The system was evaluated using extensive production traces from Alibaba's MaxCompute, encompassing 0.62 million jobs and 121 million instances across three distinct department workloads (A, B, and C). These workloads represent a spectrum of complexity and job durations.

The RO system was compared against the existing "Fuxi" scheduler and a "History-Based Optimizer" (HBO). Simulations replaying these traces showed that the proposed system consistently outperformed existing methods.

4. Key Results and Insights

The experimental results highlight several critical findings:

  • Efficiency Gains: The system achieved a 37-72% reduction in latency and a 43-78% reduction in cloud costs. This demonstrates that fine-grained management can simultaneously improve performance and reduce expenditure.
  • Operational Speed: Optimization decisions were completed within 0.02 to 0.23 seconds, proving the system's viability for high-throughput production environments.
  • Prediction Accuracy: The MCI+GTN model achieved a median error rate of 7-15%, outperforming state-of-the-art models like QPPNet and TLSTM.
  • System Dynamics: A key insight was that modeling hardware and machine-level dynamics is more impactful than improving cardinality estimation alone. While cardinality is a classic focus in database research, it only contributed a 0.2-0.4% improvement in latency prediction error in this context.

5. Conclusion and Future Work

This research demonstrates the power of fine-grained, instance-level resource management in big data processing. By decomposing the optimization problem and leveraging graph-based deep learning, we can significantly mitigate the impact of stragglers and resource waste.

Future work will focus on improving predictions for IO-intensive operators, such as TableScan and MergeJoin, which remain challenging due to the lack of fine-grained IO features in current system traces. Additionally, we aim to incorporate model uncertainty into the optimization process to enhance robustness against noisy predictions in dynamic cluster environments.

Summary updated

BibTeX
@article{lyu2022fine,
  author = {Chenghao Lyu and Qi Fan and Fei Song and Arnab Sinha and Yanlei Diao and Wei Chen and Li Ma and Yihui Feng and Yaliang Li and Kai Zeng and Jingren Zhou},
  title = {{Fine-Grained Modeling and Optimization for Intelligent Resource Management in Big Data Processing}},
  journal = {Proc. VLDB Endow.},
  year = {2022},
}
Figure