Elastic Resource Management for Deep Learning Applications in a Container Cluster

Ying Mao, Vaishali Sharma, Wenjia Zheng, Long Cheng, Qiang Guan, Ang Li

Introduction

Deep learning (DL) training is notoriously resource-hungry and expensive. Most cloud infrastructures, such as Kubernetes or Docker Swarm, treat these training jobs as "black boxes," allocating resources using static limits or "fair-share" policies. However, DL training exhibits a unique characteristic: non-linear convergence. As shown in Figure 1, models often achieve the majority of their potential accuracy in the first fraction of their training time, while the remainder is spent chasing marginal gains. Standard schedulers treat these phases identically, wasting expensive compute cycles on models with diminishing returns while new, high-potential jobs are starved of resources.

Accuracy vs. Cumulative Time showing non-linear convergence across various DL models.

The FlowCon System

To address this "fairness trap," we introduce FlowCon, a dynamic resource management system that monitors the internal progress of DL jobs at runtime to make elastic resource decisions. The core innovation of FlowCon is the Growth Efficiency Metric, which measures the magnitude of change in a model's loss function or accuracy per unit of compute resource used.

FlowCon categorizes active containers into three tiers:

  1. New List (NL): Young jobs making rapid progress.
  2. Watching List (WL): Jobs nearing convergence.
  3. Completing List (CL): Jobs that have reached a plateau.

Using the docker update command, FlowCon elastically adjusts CPU limits in real-time, withdrawing resources from the "Completing List" and reallocating them to the "New List." The system employs adaptive thresholding to dynamically define "fast" or "slow" progress based on the average performance of all jobs in the cluster. Furthermore, when a new job arrives, the manager node selects a worker host by calculating which host has the most "expendable" resources—those jobs with the lowest growth efficiency.

Experimental Evaluation

The system was evaluated using standard DL models, including MNIST (PyTorch and TensorFlow), Variational Autoencoders (VAE), and various RNN architectures (LSTM, GRU). Experiments were conducted on physical Xeon nodes (NSF Cloudlab) and virtualized environments (Google Cloud Platform).

Key Results

FlowCon demonstrates significant improvements in both individual job performance and overall cluster throughput. Compared to the default Docker Swarm (DS) scheduler, FlowCon reduced individual job completion times by up to 68.8%. As illustrated in Figure 5, FlowCon consistently outperforms non-adaptive (NA) schedulers across various job IDs.

Comparison of job completion times between FlowCon and a non-adaptive (NA) scheduler across 10 jobs.

In terms of cluster-wide efficiency, the "makespan" (total time to finish a batch of jobs) was reduced by 18.0% in a 10-job scenario and 12.9% in a 40-job scenario. FlowCon also showed robust scalability in multi-worker clusters, successfully managing up to 60 concurrent jobs while maintaining efficiency gains in heterogeneous hardware environments.

Conclusion and Future Work

FlowCon proves that "fair share" allocation is often inefficient in DL contexts. By treating compute power as an investment and prioritizing jobs with the highest "Growth Efficiency," the entire cluster can complete workloads significantly faster. While the current implementation focuses on CPU allocation, future work will aim to incorporate GPU, memory bandwidth, and network I/O into the growth efficiency calculation, alongside integrating specific Quality of Service (QoS) requirements for deadline-sensitive tasks.

Summary updated

BibTeX
@article{mao2023elastic,
  author = {Ying Mao and Vaishali Sharma and Wenjia Zheng and Long Cheng and Qiang Guan and Ang Li},
  title = {{Elastic Resource Management for Deep Learning Applications in a Container Cluster}},
  journal = {IEEE Trans. Cloud Comput.},
  year = {2023},
  doi = {10.1109/tcc.2022.3194128},
}
Figure