Energy-Efficient GPU Clusters Scheduling for Deep Learning

Diandian Gu, Xintong Xie, Gang Huang, Xin Jin, Xuanzhe LiuarXiv 2023 · DOI

Introduction

Training large-scale deep learning (DL) models has become a massive energy sink. For instance, training a single large Transformer model can emit as much CO2 as five cars over their entire lifetimes. Despite the increasing pressure on data centers to reduce their carbon footprints, current GPU schedulers remain largely "energy-blind." Most existing systems prioritize Job Completion Time (JCT) or hardware utilization, ignoring critical "knobs" like GPU core frequency (DVFS) and job-level hyperparameters that significantly impact energy efficiency.

PowerFlow addresses this challenge by balancing the trade-off between speed and energy consumption. It manages cluster resources to minimize JCT while adhering to a strict total energy budget.

The PowerFlow Framework

PowerFlow manages GPU clusters through three integrated pillars designed to optimize the energy-to-speed ratio.

1. Performance and Energy Modeling

PowerFlow utilizes mathematical models to predict a job's throughput and energy consumption per iteration. These models incorporate variables such as the number of GPUs ($n$), local batch size ($bs$), and GPU core frequency ($f$). Crucially, the models account for communication overheads, such as synchronization via NVLink or Ethernet, which become significant as jobs scale.

2. Energy-Aware Greedy Allocation

The system introduces Energy Efficiency (EE), defined as throughput per unit of energy. PowerFlow employs a two-step greedy algorithm:

  • Step 1: It allocates GPUs to jobs that offer the highest "marginal return"—the greatest reduction in JCT for the smallest increase in energy.
  • Step 2: If the cluster's total power remains under the budget, it dynamically boosts the core frequencies of the most energy-efficient jobs to further accelerate them.
Comparison between traditional sequential scheduling at max frequency (left) and PowerFlow's concurrent scheduling at optimized frequencies (right).

3. Smart Job Placement

To eliminate "vampire" drainage from idle GPUs, PowerFlow uses network packing and buddy allocation. By clustering jobs together on fewer nodes, unused hardware can be powered down completely, significantly reducing the cluster's baseline energy consumption.

Experimental Evaluation

The researchers evaluated PowerFlow using real-world measurements from NVIDIA V100 GPUs across various models (ResNet18, VGG16, Inception V3, GPT-2, and Deep Speech 2) and a 24-hour subset of the Alibaba workload trace containing 1,901 jobs.

Key Insights

  • The Frequency "Sweet Spot": Empirical data shows that the default maximum GPU frequency is rarely the most energy-efficient. As shown in the profiling data, lowering the frequency often results in substantial energy savings with only a marginal hit to throughput.
  • Elasticity: PowerFlow treats resource allocation and frequency as dynamic variables that can change during execution based on cluster-wide needs.
  • Idle Power Mitigation: Idle GPUs consume non-negligible power. Aggressive job packing is essential for overall efficiency.
GPU energy per iteration across different frequencies and GPU counts, highlighting the non-linear relationship and the existence of energy-efficient 'sweet spots'.

Results and Discussion

Under the same energy budget, PowerFlow improved average JCT by 1.57x to 3.39x compared to state-of-the-art baselines like Gandiva, Tiresias, and Zeus. The predictive models were highly accurate, maintaining a Mean Absolute Percentage Error (MAPE) of less than 10%. PowerFlow proved particularly effective under heavy loads, where its ability to prioritize energy-efficient configurations allowed the cluster to process more work within the same power envelope.

Limitations and Future Work

While effective, PowerFlow requires a ~4-minute offline profiling run for each new job. This is negligible for long-running training tasks but could be a bottleneck for short experimental runs. Future work may explore automatic tuning of global batch sizes and adaptation to heterogeneous clusters containing multiple GPU generations.

Summary updated

BibTeX
@misc{gu2023energy,
  author = {Diandian Gu and Xintong Xie and Gang Huang and Xin Jin and Xuanzhe Liu},
  title = {{Energy-Efficient GPU Clusters Scheduling for Deep Learning}},
  year = {2023},
  eprint = {2304.06381},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.06381},
}
Figure