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

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

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).


Problem

Specialized accelerators — GPUs, TPUs, FPGAs, custom ASICs — are increasingly deployed for DNN training, and they exhibit heterogeneous performance behavior across model architectures. ResNet-50 sees a nearly 10× speedup moving from a K80 to a V100, while an A3C deep-RL model sees only 2×; once throughput is dollar-normalized against GCP on-demand prices, the V100 is no longer optimal for all models and the older P100 is competitive or cheaper per dollar for many. Existing GPU cluster schedulers — Gandiva, Tiresias, Themis — arbitrate these expensive resources across users while optimizing fairness or makespan, but do not consider this heterogeneity at all. The two schedulers that do, AlloX and Gandiva_fair, each optimize a single objective and tightly couple their scheduling mechanism to it, so they cannot express the hierarchical and cost/SLO policies operators actually want. Utilization optimizations such as space sharing and placement sensitivity are likewise deployed ad hoc rather than being folded into the global objective.


Core Insight

Many widely used scheduling policies — including hierarchical ones — can be written as optimization problems whose objective is a function of the jobs' achieved throughputs; replacing those throughput terms with effective throughput (the time-weighted average throughput of a job over a mix of resource configurations) mechanically converts any such policy into a heterogeneity-, colocation-, and placement-aware version, which a decoupled round-based mechanism can then realize on real hardware.


Method

Gavel operates in two decoupled steps.

Step 1 — Policy as an optimization problem. Allocations are matrices X giving the fraction of wall-clock time each job spends on each accelerator type between recomputations; a throughput matrix T gives each job's throughput in iterations/second per accelerator (T_mj = −∞ if the job cannot run there, e.g. memory limits). Effective throughput is

throughput(m, X)  =   Σ_{ j ∈ accelerator types }   T_mj · X_mj

subject to 0 ≤ X_mj ≤ 1, Σ_j X_mj ≤ 1, and Σ_m X_mj · scale_factor_m ≤ num_workers_j. Substituting this into an existing policy yields its heterogeneity-aware form — e.g. heterogeneity-aware LAS maximizes min_m (1/w_m) · throughput(m, X) / throughput(m, X_m^equal). Table 1 of the paper lists nine expressible policies: Makespan, LAS, LAS with weights, Finish Time Fairness, FIFO, Shortest Job First, Minimize cost, Minimize cost with SLOs, and Hierarchical. Most are a single linear program; the cost policies are linear-fractional programs reduced to a sequence of LPs; hierarchical policies iterate an LP (fair allocation respecting per-entity policies) with an MILP (identify bottlenecked jobs) under water filling. Space sharing adds rows for job combinations, capped at 2 jobs per combination. Placement sensitivity is modeled as two worker types, consolidated and unconsolidated.

Step 2 — Round-based scheduling mechanism. Gavel tracks t_mj, the time job (or combination) m has spent on accelerator type j, computes f_mj = t_mj / (Σ_{m'} t_{m'j}), and forms a priority matrix as the element-wise division of X^opt by f. Each round (6 minutes in the experiments) it greedily selects the highest-priority non-conflicting combinations that fit the worker budget (Algorithm 1); the exact problem is a multiple-choice knapsack and NP-hard, so occasional greedy sub-optimality is accepted and corrected in later rounds. Jobs are placed in decreasing order of requested workers, preferring accelerators on the same physical server.

Supporting components. A throughput estimator (Quasar-style) mixes profiling on dedicated workers with matrix completion to fingerprint a new job against pre-profiled reference jobs when colocated throughputs are unknown. GavelIterator wraps framework data iterators, equalizes iteration counts across distributed tasks, synchronizes round boundaries, and performs lease renewal to avoid unnecessary checkpointing. Implementation: ~9000 LOC Python plus a ~500 LOC simulator, using cvxpy and gRPC; user code changes are < 5 LOC.


Experimental Setup

Component Value
Physical cluster 8 V100 + 16 P100 + 24 K80
Simulated cluster 36 GPUs of each type (V100, P100, K80)
Hierarchical microbenchmark 3 V100 + 3 P100 + 3 K80
Throughput-estimation experiment heterogeneous 12-GPU cluster
Scalability experiment equal V100/P100/K80; cluster grows with job count (32 → 2048 jobs)
Framework PyTorch (TensorFlow future work); cvxpy for policies; gRPC for control
Traces "static" (all jobs at start) and "continuous" (Poisson arrivals, rate λ)
Simulated traces ≥ 5000 jobs, 20–30 days; jobs 4000–5000 measured; 3 seeds per λ
Physical traces 1 day, 100 jobs; average JCT of 25 steady-state jobs
Job mix 26 distinct job/model types uniformly sampled (Table 2)
Job durations 10^x min on V100; x ~ U[1.5, 3] w.p. 80%, U[3, 4] w.p. 20% (Gandiva method)
continuous-single all jobs use 1 worker
continuous-multiple 70% 1 worker, 25% 2–4 workers, 5% 8 workers (Microsoft traces)
Cost workload 500 ResNet-50 + A3C jobs; durations {0.5, 1, 2, 4, 8} days; SLOs {1.2×, 2×, 10×}
Round duration 6 minutes (swept at 360 / 720 / 1440 / 2880 s)
Baselines LAS, LAS w/ Gandiva ad-hoc SS, AlloX, FIFO, Minimize FTF, Gandiva makespan, static-partition multi-level fairness, "Gavel (ideal)", oracle-throughput SS
Metrics average JCT, finish time fairness, makespan, cost ($) and % SLO violations, total effective throughput, policy solve latency, preemption overhead

Models: ResNet-50 (ImageNet), ResNet-18 (CIFAR-10), A3C (Pong), LSTM (Wikitext-2), Transformer (Multi30k de-en), CycleGAN (monet2photo), Recoder autoencoder (ML-20M).


Headline Quantitative Results

Physical cluster (Table 3):

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

Average JCT improves 1.5× and makespan 1.2×; simulation tracks the physical cluster to within < 8%.

Preemption overhead (Table 4, 6-minute rounds): < 3% without lease renewals (worst case 2.91% for LSTM, best 0.22% for A3C); ≤ 0.47% with lease renewals. Checkpoint load/save is < 5 seconds.

Simulation (larger cluster, longer traces):

Policy Result
LAS, continuous-single at 5.6 jobs/hr 3.5× lower average JCT
LAS, continuous-multiple at 2.6 jobs/hr 2.2× lower average JCT
Gavel packing vs. Gandiva random packing 2.2× better average JCT (both traces, high load)
Finish Time Fairness 3× lower average JCT; 2.8× better average FTF
Makespan vs. FIFO / vs. Gandiva ad-hoc SS 2.5× / 1.4×; further 8% from SS at high job count
FIFO at high load, without SS / with SS 2.7× / 3.8× lower average JCT
LAS with priorities (20% high-priority) 1.5× (high-priority) / 2.7× (low-priority)
Minimize cost ~1.4× cost reduction, but ~35% of jobs violate SLOs
Minimize cost with SLOs 0 violations, 1.2× cost reduction
Hierarchical vs. static partitioning ~17% higher total effective throughput

Gavel essentially matches AlloX — the best-case average-JCT-optimizing baseline — while supporting other objectives, and supports higher load than AlloX because AlloX starves long jobs.

Other measurements: heterogeneity-aware allocation gives ~10% higher throughput than an isolated (1/n) allocation in the 3-job worked example; explicit space-sharing modeling improves objectives 2.2× over Gandiva's ad-hoc approach; the hierarchical policy solves 2048 jobs in < 10 minutes without space sharing and 512 jobs in < 10 minutes with it; average GPU SM utilization on a Microsoft cluster is as low as 52%.


Limitations

Stated by the paper:

Observed by this reviewer (facts the paper reports, framed as limitations here):


Open Problems

  1. Strategy-proofness. Sun et al. showed no fair-sharing policy can simultaneously satisfy Pareto efficiency, sharing incentive, and strategy proofness with interchangeable resources; making Gavel's policies strategy-proof is called out as future work.
  2. Richer hierarchical policy sets. Extending beyond fairness-over- {fairness, FIFO} — for example, hierarchies using finish-time fairness — is left open.
  3. TensorFlow (and broader framework) support for the scheduler API.
  4. Non-DNN and CPU settings. The authors believe the effective-throughput formulation applies to other GPU-amenable workloads such as simulations, to homogeneous DL clusters, and to CPU clusters — but performance estimates for those applications would first be needed.