Dynamic Scheduling of MPI-based Distributed Deep Learning Training Jobs

Tim Capes, Vishal Raheja, Mete Kemertas, Iqbal MohomedarXiv 2019

Introduction

This paper introduces a novel "doubling heuristic" for dynamically scheduling distributed deep learning jobs using ring-reduce architectures (like Horovod). By accounting for the specific communication overheads of ring-based synchronization—which performs significantly better when the number of GPUs is a power of two—the authors demonstrate that they can more than halve average job completion times in congested clusters.

Background: The Ring-Reduce Era

As deep learning models grow, training them on a single GPU becomes impossible. Traditionally, distributed training relied on Parameter Servers, where dedicated nodes manage model weights. However, Ring-Reduce architectures have become the new gold standard because they utilize network bandwidth more efficiently.

The challenge lies in cluster management. Most existing schedulers were designed for parameter servers and assume that adding more GPUs generally leads to linear speedups. In ring-reduce setups, this isn't always true. Due to the underlying math of how data is "passed around the ring," adding a single GPU might actually slow down training if it breaks an efficient communication pattern. Consequently, scientists often stick to static, single-server allocations, leading to poor cluster utilization and long wait times.

Methodology

The authors propose a dynamic scheduler that can stop, resize, and restart jobs to maximize cluster-wide efficiency. Their approach consists of three main components:

  1. Performance Modeling: They use Non-Negative Least Squares (NNLS) to model how many epochs a model needs to converge and how fast it processes those epochs given $w$ workers.
  2. Communication-Aware Math: They derive specific cost formulas for different ring-reduce algorithms (Standard Ring, Doubling-Halving, and Binary Blocks). This highlights that "Doubling-Halving" is highly efficient but only works when the number of GPUs is a power of two ($2^n$).
  3. The Doubling Heuristic: Instead of a standard greedy approach (adding one GPU at a time), their algorithm evaluates the "marginal gain" of doubling the worker count. This prevents the scheduler from getting "stuck" at a local optimum—for example, refusing to go from 8 to 9 GPUs because it's slower, even though 16 GPUs would be much faster.

Experimental Setup

The researchers evaluated their approach using:

  • CIFAR-10: A standard image classification dataset used to train a ResNet-110 model.
  • Simulated Cluster Workloads: To test the scheduler at scale, they simulated a 64-GPU cluster with varying levels of "contention" (Extreme, Moderate, and None) based on Poisson arrival times of training jobs.

Key Insights

  • The "Power of Two" Sweet Spot: The paper quantifies why ring-reduce performance is non-linear. Because the doubling-halving algorithm has logarithmic latency, a cluster of 8 GPUs is often disproportionately faster than a cluster of 7 or 9.
  • Low-Cost Context Switching: A critical finding is that stopping and restarting a Horovod-based job (checkpointing) is incredibly "cheap," taking only about 10 seconds. This makes aggressive dynamic rescheduling feasible in real-time.
  • Avoiding Local Optima: Standard greedy schedulers fail here because they look only one step ahead. By using a doubling heuristic, the scheduler "leaps" over inefficient configurations to find the next high-performance tier.

Results and Discussion

In simulations of "Moderate Contention," the proposed scheduling strategies (Precompute and Exploratory) reduced average job completion times from approximately 6 hours (fixed 1-GPU allocation) to under 3 hours.

Comparison of scheduling algorithms across different contention levels.

Even compared to a fixed 8-GPU allocation strategy, the dynamic "Precompute" strategy was 2.3x faster in moderate contention scenarios because it could reallocate resources from idle GPUs to active jobs. In actual hardware tests, pausing a job and scaling it from 4 to 8 GPUs saved approximately 32% of the total training time compared to staying at 4 GPUs.

Training time comparison for static vs. dynamic GPU allocation.

Limitations and Future Work

While promising, the experimental results are primarily focused on ResNet-110 and image classification. Different architectures (like NLP models or Transformers) and different optimizers might have different scaling behaviors. Furthermore, the study assumes a cluster of identical GPUs (Tesla K40m). Real-world clusters are often heterogeneous, which would complicate the communication math. Future work will involve expanding the simulator to handle a wider range of workloads and integrating it into a production-ready scheduler for deep learning clusters.

Summary updated

BibTeX
@misc{capes2019dynamic,
  author = {Tim Capes and Vishal Raheja and Mete Kemertas and Iqbal Mohomed},
  title = {{Dynamic Scheduling of MPI-based Distributed Deep Learning Training Jobs}},
  year = {2019},
  eprint = {1908.08082},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.08082},
}
Figure