DL2: A Deep Learning-Driven Scheduler for Deep Learning Clusters

Yanghua Peng, Yixin Bao, Yangrui Chen, Chuan Wu, Chen Meng, Wei Lin

TL;DR

This paper introduces DL2, a novel deep learning-driven scheduler for deep learning clusters that dynamically adjusts resource allocation to minimize job completion times. By combining offline supervised learning with online reinforcement learning, DL2 achieves significant performance improvements over existing schedulers, demonstrating its ability to efficiently manage complex DL workloads.

What Problem Does This Paper Address?

The increasing prevalence of deep learning (DL) models in various AI services has led to the deployment of large, expensive DL clusters. Efficiently scheduling jobs on these clusters is crucial for maximizing resource utilization and minimizing training times. Current schedulers fall into two main categories: general-purpose cluster schedulers that are often unaware of DL workload specifics, and specialized heuristic-based schedulers that require deep domain knowledge and are tightly coupled with specific ML frameworks, making them brittle to updates. This leaves a gap for a generic, efficient, and adaptive scheduler that can handle the dynamic nature of DL workloads and cluster environments.

Methods

DL2 employs a two-stage learning approach:

  1. Offline Supervised Learning (Warm-up): A neural network (NN) policy is initially trained using historical job traces from an existing cluster scheduler. This "warms up" the NN, allowing it to mimic the performance of the current scheduler and ensuring a smooth transition.
  2. Online Reinforcement Learning (Fine-tuning): The warmed-up NN is then deployed in the live DL cluster. It fine-tunes its policy through reinforcement learning, receiving feedback from actual job progress and cluster state. This allows DL2 to learn beyond the capabilities of the initial scheduler.

Key components of DL2's approach include:

  • Dynamic Resource Scaling: DL2 can dynamically adjust the number of workers and parameter servers allocated to jobs during their execution. This is implemented by enhancing the MXNet framework for "hot" scaling without job termination.
  • Actor-Critic Reinforcement Learning: To expedite learning and improve stability, DL2 uses an actor-critic algorithm. This involves a policy network (actor) that decides actions and a value network (critic) that estimates the value of states, providing a more stable gradient for policy updates.
  • Job-Aware Exploration: To avoid inefficient or poor exploration in the action space, DL2 incorporates a mechanism to identify and handle "poor" states (e.g., jobs with many workers but no PS, or vice-versa) by adopting predefined actions.
  • Experience Replay: To mitigate sample correlation and improve learning stability, DL2 uses an experience replay buffer to store and sample past experiences.

Datasets

The paper utilizes two primary sources of data:

  • Historical Job Traces: A dataset of job traces collected from a production DL cluster is used for the offline supervised learning phase.
  • Simulated Job Traces: Patterns from a 75-day real-world job trace are used to generate job arrival and duration distributions for controlled simulations.
  • MXNet Tutorials: A selection of 8 ML models from official MXNet tutorials are used to represent diverse DL workloads for experiments.

Key Insights and Ideas

  • DL for Scheduling is Viable: The paper demonstrates that deep learning, specifically reinforcement learning, can be effectively applied to create a generic and high-performing scheduler for complex DL clusters, moving beyond traditional heuristic-based approaches.
  • Bridging the Gap with Hybrid Learning: The combination of offline supervised learning for initial bootstrapping and online reinforcement learning for continuous improvement is crucial. This hybrid approach ensures a smooth transition from existing schedulers and allows DL2 to adapt to real-world dynamics.
  • Dynamic Scaling is Key: Static resource allocation is a significant bottleneck. DL2's ability to dynamically scale resources up or down based on real-time job progress and cluster load is a core enabler of its performance gains.
  • Actor-Critic and Job-Awareness Improve RL: Standard RL algorithms are insufficient. DL2's enhancements, such as actor-critic methods for stability and job-aware exploration for efficiency, are critical for practical application in complex systems.
  • Real-world Feedback is Invaluable: Relying on simulations alone can lead to inaccurate models. DL2's emphasis on learning from real-time feedback in a live cluster is a significant advantage.

Key Results

  • Significant Performance Improvement: DL2 outperforms the Dominant Resource Fairness (DRF) scheduler by 44.1% in terms of average job completion time.
  • Outperforms Expert Heuristics: DL2 achieves 17.5% higher performance than Optimus, a state-of-the-art expert heuristic scheduler.
  • Faster Convergence: The hybrid learning approach allows DL2 to converge to a good policy much faster than pure online RL.
  • Low Scaling Overhead: Dynamic scaling operations (adding/removing PSs) introduce minimal overhead, typically in the tens of milliseconds, compared to checkpointing which can take minutes.
  • Adaptability: DL2 demonstrates the ability to adapt to new, unseen job types over time.
  • Robustness to Estimation Errors: The scheduler shows resilience to errors in user-provided epoch estimations.

Limitations and Future Work

  • Scalability of Concurrent Jobs: The paper notes that performance can suffer when the number of concurrent jobs exceeds the NN's input capacity (J). Future work could explore larger J or more sophisticated batching strategies.
  • Job Placement: While DL2 focuses on resource allocation, the paper suggests that job placement (deciding where to run jobs) could also be learned by RL, potentially using hierarchical NN models.
  • Adversarial Attacks and Monitoring: Practical deployment might require addressing adversarial attacks that could fool the NN and developing robust monitoring systems for exceptional scheduling behavior.
  • All-Reduce Architectures: The current implementation focuses on the parameter server architecture. Extending DL2 to handle all-reduce architectures is a potential future direction.
  • Federated Training: Preliminary results suggest that federated training can enable collaborative learning across multiple clusters, leading to faster convergence and stable global performance. This could be further explored.

Summary updated

BibTeX
@article{peng2021dl,
  author = {Yanghua Peng and Yixin Bao and Yangrui Chen and Chuan Wu and Chen Meng and Wei Lin},
  title = {{DL2: A Deep Learning-Driven Scheduler for Deep Learning Clusters}},
  journal = {IEEE Trans. Parallel Distributed Syst.},
  year = {2021},
  url = {https://openreview.net/forum?id=CHOdtd8t09},
}
Figure