Gavel: Heterogeneity-Aware Cluster Scheduling Policies for Deep Learning Workloads — Detailed Summary

Deepak Narayanan*, Keshav Santhanam*, Fiodar Kazhamiaka (Stanford University); Amar Phanishayee (Microsoft Research); Matei Zaharia (Stanford University) | 14th USENIX Symposium on Operating Systems Design and Implementation (OSDI '20), November 4–6 2020 | ISBN 978-1-939133-19-9 | *work done in part as interns at Microsoft Research

Filing note: the local file is 0067_Gravel.pdf; the system's name in the paper is Gavel. Artifact: https://github.com/stanford-futuredata/gavel (MIT License).

Per-section summary organized by the paper's own headings, with paragraph-level bullets and exact quantitative results where the paper provides them. Values appearing only inside un-labeled figure bars or heatmap cells are not reconstructed; only numbers stated in text, tables, or inline matrices are reported.


Abstract


1 Introduction

Reason 1 — Performance Heterogeneity.

Reason 2 — Generality across Policies.

Reason 3 — Colocation and Placement Optimizations.

The proposal and key observation.

From allocation to schedule.

Results preview and contributions.


2 Background

2.1 Deep Neural Network (DNN) Training

2.2 Performance Optimizations


3 System Overview

3.1 Heterogeneity-Aware Policies

                 V100   P100   K80
              ┌                      ┐
X_example  =  │  0.6    0.4    0.0   │  job 0
              │  0.2    0.6    0.2   │  job 1
              │  0.2    0.0    0.8   │  job 2
              └                      ┘
throughput(m, X)  =   Σ_{ j ∈ accelerator types }   T_mj · X_mj
(1)   0 ≤ X_mj ≤ 1                                    ∀(m, j)
(2)   Σ_j X_mj ≤ 1                                    ∀m
(3)   Σ_m X_mj · scale_factor_m ≤ num_workers_j       ∀j

Space Sharing (SS).

                    V100        P100    K80
              ┌                              ┐
T  =          │   40.0         20.0    10.0  │  job 0
              │   15.0         10.0     5.0  │  job 1
              │ (20.0, 7.5)     0.0     0.0  │  jobs (0, 1)
              └                              ┘
throughput(m, X)  =   Σ_{ j ∈ accel. types }  Σ_{ k ∈ C_m }   T_kjm · X_kjm

0 ≤ X_kj ≤ 1                                     ∀(k, j)
Σ_{k ∈ C_m} Σ_j X_kj ≤ 1                         ∀m
Σ_k X_kj · scale_factor_m ≤ num_workers_j        ∀j

Placement Sensitivity.

3.2 Round-based Scheduling Mechanism

Matrix job 0 job 1 job 2
rounds_received_n 3, 1, 0 1, 3, 0 0, 0, 4
priorities_n 0.2, 0.4, 0 0.2, 0.2, ∞ ∞, 0, 0.2
rounds_received_{n+1} 3, 2, 0 1, 3, 1 1, 0, 4

3.3 Throughput Estimator

3.4 Limitations and Non-Goals

"While Gavel exposes a flexible API that supports a variety of policies and objectives, we do not propose new scheduling policies or performance optimizations in this work."


4 Scheduling Policies

4.1 Max-Min Fairness as an Optimization Problem

Maximize_X   min_m   (1 / w_m) ·  throughput(m, X) / throughput(m, X_m^equal)
            V100     K80                           V100     K80
      ┌                    ┐                ┌                    ┐
T  =  │  40.0     10.0     │  job 0         │  0.45     0.0      │  job 0
      │  12.0      4.0     │  job 1    →    │  0.45     0.09     │  job 1   = X_het.
      │ 100.0     50.0     │  job 2         │  0.09     0.91     │  job 2
      └                    ┘                └                    ┘
Maximize_X  min_m  (1 / w_m) · [ throughput(m, X) / throughput(m, X_m^equal) ] · scale_factor_m

4.2 Other Policies as Optimization Problems

Table 1: Policies that can be expressed in Gavel

Policy Description
Makespan Minimize time taken by batch of jobs.
LAS [Tiresias] Max-min fairness by total compute time.
LAS w/ weights Max-min fairness with weights.
Finish Time Fairness [Themis] Maximize minimum job speedup.
FIFO First in, first out.
Shortest Job First Minimize time taken by shortest job.
Minimize cost Minimize total cost in public cloud.
Minimize cost w/ SLOs Minimize total cost subject to SLOs.
Hierarchical Multi-level policy: FIFO, fairness, etc.
                   t_m + num_steps_m / throughput(m, X)
ρ_T(m, X)  =  ────────────────────────────────────────────────────
              t_m^isolated + num_steps_m / throughput(m, X^isolated)

Minimize_X   max_m   ρ_T(m, X)
Maximize_X    [ Σ_m throughput(m, X) ]  /  [ Σ_m ( Σ_j cost_j · X_mj ) ]

The numerator is time-averaged effective throughput, the denominator time-averaged cost. Under space sharing, care must be taken not to double-count the cost of instances running job combinations (all jobs in a combination derive value as some throughput).

4.3 Hierarchical Scheduling Policies

Maximize_X   min_{ m : w_m^job > 0 }   (1 / w_m^job) · [ throughput(m, X) / throughput(m, X_m^equal) − t_m ]

4.4 Properties of Gavel's Policies


5 Scheduling Mechanism

Algorithm 1 (as printed):

 1: function SCHEDULE_JOBS
 2:     active_combinations ← all active job combinations
 3:     num_workers_rem. ← number of total workers
 4:     while num_workers_rem. > 0 do
 5:         j ← job combination with highest priority
 6:         Remove j from active_combinations
 7:         if j.scale_factor > num_workers_rem. then
 8:             continue
 9:         for all j' that conflict (share a job k) with j do
10:             Remove j' from active_combinations
11:         num_workers_rem. −= j.scale_factor
                 V100   P100   K80
              ┌                      ┐
X^{het.+SS} = │  1.0    0.0    0.0   │  jobs 0+1   (space-shared pair)
              │  0.0    0.5    0.5   │  job 2
              │  0.0    0.5    0.5   │  job 3
              └                      ┘

6 Implementation


7 Evaluation

Questions: do the heterogeneity-aware policies improve objectives on a physical cluster (§7.2) and in simulations of larger clusters (§7.3)? How do the policies scale (§7.4)? How well does the mechanism realize the allocations (§7.5)? Can Gavel accurately estimate colocated throughputs (§7.6)?

7.1 Experiment Setup

Table 2: Models used in the evaluation

Model Task Dataset / Application Batch size(s)
ResNet-50 Image Classification ImageNet 16, 32, 64, 128
ResNet-18 Image Classification CIFAR-10 16, 32, 64, 128, 256
A3C Deep RL Pong 4
LSTM Language Modeling Wikitext-2 5, 10, 20, 40, 80
Transformer Language Translation Multi30k (de-en) 16, 32, 64, 128, 256
CycleGAN Image-to-Image Translation monet2photo 1
Recoder (Autoencoder) Recommendation ML-20M 512, 1024, 2048, 4096, 8192

7.2 End-to-End Results on Physical Cluster

Table 3: End objective, physical experiment vs. simulation

Trace System Objective Physical Simulation
Continuous Gavel Average JCT 3.4 hrs 3.7 hrs
Continuous LAS Average JCT 5.1 hrs 5.4 hrs
Static Gavel Makespan 17.7 hrs 17.6 hrs
Static Gandiva Makespan 21.3 hrs 22.1 hrs

(Continuous trace: average JCT of 25 jobs in a steady-state cluster. Static trace: total time to complete 100 jobs submitted at the start of the run.)

Table 4: Overhead of preemptive scheduling (round duration = 6 minutes)

Model Overhead without lease renewals Overhead with lease renewals
ResNet-18 0.94% 0.17%
ResNet-50 1.58% 0.25%
A3C 0.22% 0%
LSTM 2.91% 0.47%
Transformer 0.77% 0.11%
CycleGAN 0.77% 0.11%

7.3 End-to-End Results in Simulation

Least Attained Service (LAS) (Figures 9, 10). Baselines: vanilla LAS; LAS with Gandiva's ad-hoc space sharing; and AlloX, which explicitly optimizes average JCT but only for single-worker jobs.

Finish Time Fairness (FTF) (Figure 11, continuous-multiple).

Makespan.

FIFO.

LAS with priorities.

Cost.

Multi-level Hierarchical Policies (Figures 12, 13).

7.4 Scalability of Heterogeneity-Aware Policies

7.5 Efficacy of Scheduling Mechanism

7.6 Impact of Throughput Estimation


Existing DNN Training Schedulers.

Traditional Cluster Schedulers. Mesos, Borg, TetriSched, YARN support fixed heterogeneous resource requests but do not reason about jobs' diverse performance across accelerators, nor about interchangeable resource types that run the same computation: Mesos's DRF allocates distinct resource types (RAM vs. CPUs) but assumes each job declared which resources it needs and in what ratio. The multi-interchangeable resource allocation (MIRA) problem introduces a similar notion of effective throughput but does not show how to specify policies as optimization problems, ignores space sharing and placement sensitivity, and does not discuss realizing allocations on physical resources. Omega, Apollo, Hydra handle heterogeneity in task number and duration, but tasks largely take the same time on different CPUs and memory heterogeneity only affects how many/large tasks fit on a server; in Gavel's setting the compute devices themselves are interchangeable with sometimes large performance differences, and policies decide time fractions while optimizing end objectives.

Dynamic Performance Estimation. Gavel uses Quasar's approach to estimate co-located performance online, mixing profiling and matrix completion to compute a "fingerprint" against offline-profiled reference models; the contribution is showing Quasar's techniques apply to this new setting.

Applicability to Other Settings. The authors believe Gavel can serve non-DNN GPU workloads such as simulations (given performance estimates), and that the main insight — formulating diverse scheduling policies as optimization problems — is broadly applicable, usable on homogeneous deep learning clusters and on CPU clusters.


9 Conclusion


A Artifact Appendix


Cross-Cutting Quantitative Summary

Result Value Source
ResNet-50 speedup, V100 vs. K80 nearly 10× §1 (Fig. 1a)
A3C speedup, V100 vs. K80 §1 (Fig. 1a)
Explicit SS modeling vs. Gandiva ad-hoc 2.2× better objective §1, §7.3
Average GPU utilization on a Microsoft cluster as low as 52% §2.2
Heterogeneity-aware vs. isolated allocation (3-job example) ~10% higher throughput §4.1
Physical cluster average JCT 1.5× (5.1 → 3.4 hrs) §7.2, Table 3
Physical cluster makespan 1.2× (21.3 → 17.7 hrs) §7.2, Table 3
Simulator vs. physical fidelity < 8% difference §7.2
Preemption overhead, 6-min rounds, no lease renewal < 3% (max 2.91%, LSTM) Table 4
Preemption overhead, with lease renewal ≤ 0.47% Table 4
LAS average JCT, continuous-single at 5.6 jobs/hr 3.5× §7.3
LAS average JCT, continuous-multiple at 2.6 jobs/hr 2.2× §7.3
Gavel packing vs. Gandiva packing 2.2× better average JCT (both traces, high load) §7.3
FTF policy: average JCT / average FTF 3× / 2.8× §7.3
Makespan vs. FIFO / vs. Gandiva ad-hoc SS 2.5× / 1.4× §7.3
Makespan further reduction from SS at high job count 8% §7.3
FIFO average JCT at high load, without SS / with SS 2.7× / 3.8× §7.3
SS benefit: distributed jobs vs. continuous-single 1.1× vs. 1.4× §7.3
LAS w/ priorities: high-priority / low-priority JCT 1.5× / 2.7× §7.3
Min-cost policy: cost reduction; SLO violations ~1.4×; ~35% of jobs §7.3
Cost-with-SLO policy 0 violations; 1.2× cost reduction §7.3
Static partitioning vs. heterogeneity-aware hierarchical ~17% lower total effective throughput §7.3
Hierarchical policy runtime, no SS, 2048 jobs < 10 minutes §7.4
Hierarchical policy runtime, with SS, 512 jobs < 10 minutes §7.4
Checkpoint load/save time < 5 seconds §7.5
Chosen round duration 6 minutes §3.2, §5, §7.5
Implementation size ~9000 LOC scheduler + ~500 LOC simulator §6
save_checkpoint / load_checkpoint user code < 5 LOC §6
Max jobs per space-sharing combination 2 §3.1

Limitations

Sourcing note: items under Stated by the paper are limitations, non-goals, or future work the paper itself declares. Items under Observed by this reviewer are my own framing of facts the paper reports; the paper does not present them as limitations.

Stated by the paper

Observed by this reviewer