Speculative Container Scheduling for Deep Learning Applications in a Kubernetes Cluster

Ying Mao, Yuqi Fu, Wenjia Zheng, Long Cheng, Qingzhi Liu, Dingwen TaoIEEE Syst. J 2020

Abstract

Deep learning (DL) training workloads often exhibit non-linear convergence patterns, where significant accuracy gains occur early in the process followed by long periods of marginal improvement. Standard cluster orchestrators like Kubernetes are typically "application-blind," treating all containers equally regardless of their internal training state. This paper introduces SpeCon, a speculative container scheduler that monitors model training progress to identify jobs with diminishing returns. By speculatively migrating converged models to lower-priority resources, SpeCon frees up high-performance slots for models still in rapid learning phases. Experimental results demonstrate that SpeCon improves individual job completion times by up to 41.5% and overall system makespan by up to 24.7%.

Introduction

Current cloud resource management systems, such as Kubernetes, schedule containers based on static resource requests (CPU, GPU, RAM). However, these systems lack insight into the application-specific progress of DL training. In a typical DL job, the evaluation function (loss or accuracy) improves rapidly at first but eventually plateaus. A model that is 99% converged consumes the same high-performance resources as a newly started job, leading to inefficient cluster utilization. SpeCon addresses this by introducing progress-aware scheduling that prioritizes jobs based on their "growth" potential.

SpeCon Architecture and Methods

SpeCon enhances the Kubernetes scheduling logic by incorporating a layer of intelligence that monitors and reacts to the internal state of DL containers. The system architecture consists of several key components integrated into the Kubernetes ecosystem, including a specialized scheduler and worker monitors.

The SpeCon system architecture integrated with the Kubernetes control plane.

The workflow involves three primary stages:

  1. Progress Monitoring: SpeCon tracks the "growth" ($G$) of the evaluation function over time by accessing training logs.
  2. Categorization: Containers are classified into three states: Progressing (PC) for fast-growing models, Watching (WC) for slowing models, and Converged (CC) for those that have reached a plateau.
  3. Speculative Migration: When a job is identified as "Converged," SpeCon calculates a weighted score for available workers and speculatively migrates the container. This releases resources on the original host for "Progressing" jobs.

To minimize overhead, SpeCon leverages native checkpointing in frameworks like TensorFlow and PyTorch. Experiments show that container migration adds less than 5 seconds of overhead, making frequent adjustments feasible.

Key Insights: The 20/90 Rule

A fundamental observation driving SpeCon is the "20/90 Rule": for many common architectures like VAEs and GRUs, approximately 90% of total accuracy gain occurs within the first 20% of training time. While resource consumption remains constant, the value derived from those resources drops significantly as the model converges. SpeCon exploits this by treating "speculation" as a service—moving jobs based on performance trends rather than just resource exhaustion or node failure.

Experimental Results

The researchers evaluated SpeCon on an NSF Cloudlab testbed using a variety of models (VAE, Bi-RNN, GRU) and scheduling scenarios. SpeCon was compared against the default Kubernetes scheduler (DS).

Comparison of job completion times between the default Kubernetes scheduler (DS) and SpeCon across 20 different jobs.

As shown in the results, SpeCon consistently reduces completion times for a wide range of job IDs. Key performance metrics include:

  • Individual Speedup: Completion times for specific jobs improved by up to 41.5%.
  • System Efficiency: Average job completion times across the cluster improved by 14.8%.
  • Makespan Reduction: The total time to finish a batch of jobs was reduced by up to 24.7%.

The system also demonstrated strong scalability, with performance gains increasing as the number of worker nodes provided more speculative migration targets.

Conclusion and Future Work

SpeCon demonstrates that application-aware scheduling can significantly enhance the efficiency of DL clusters. By identifying and migrating converged jobs, the system optimizes the allocation of high-performance resources. Future work will focus on extending SpeCon to long-running training jobs, reducing log dependency, and optimizing migration costs for large-scale GPU-based workloads.

Summary updated

BibTeX
@inproceedings{mao2020speculative,
  author = {Ying Mao and Yuqi Fu and Wenjia Zheng and Long Cheng and Qingzhi Liu and Dingwen Tao},
  title = {{Speculative Container Scheduling for Deep Learning Applications in a Kubernetes Cluster}},
  booktitle = {IEEE Syst. J},
  year = {2020},
  doi = {10.1109/jsyst.2021.3129974},
}
Figure