Shockwave: Fair and Efficient Cluster Scheduling for Dynamic Adaptation in Machine Learning

Pengfei Zheng, Rui Pan, Tarannum Khan, Shivaram Venkataraman, Aditya Akella | University of Wisconsin-Madison / UT Austin | arXiv:2210.00093v1 [cs.DC], 30 Sep 2022 | https://github.com/uw-mad-dash/shockwave


Problem

Shared GPU clusters must fairly arbitrate among competing DNN training jobs while packing them efficiently, but existing schedulers do neither well once jobs change their own configuration mid-run. Elastic ML jobs now scale batch size during training — OpenAI scaled GPT-3's batch size from 32 to 32M for a 500× speedup, and BERT-Large uses 256 to 4096 for a 2.5× speedup — which changes a job's throughput and remaining run time unpredictably. Prior market-theoretic schedulers (DRF, Themis, REF) all assume static, known resource requests, and filter-based schedulers (AlloX, Themis) need a hand-tuned fixed filter that is sub-optimal on both fairness and efficiency. Schedulers that are agnostic or reactive to adaptation overestimate remaining run time, mistakenly extend the finish-time-fairness deadline, and cannot compensate for early under-prioritization. Pollux does handle dynamism, but by auto-scaling batch size on behalf of jobs — which the authors show costs accuracy.


Core Insight

Extending the classic static Fisher market to a discrete-time Volatile Fisher Market (buyers with time-variant utilities over volatile goods), and proving that maximizing Nash Social Welfare Over Time solves its equilibrium, lets a scheduler co-optimize long-term fairness and efficiency under dynamic adaptation — provided the future adaptation trajectory is forecast rather than reacted to, which is feasible because real batch-size scaling policies (Accordion, GNS) have deterministic configuration transitions so only regime duration is random.


Method

Three components, composed into one round-based scheduler:

Component 1: Volatile Fisher Market (VFM)   [theory]
  - discrete rounds t = 1..T; all resources volatile (no carry-over)
  - job i's utility is a sequence of time-variant functions u_it
  - equilibrium = (a) Optimal Spending  (b) Work-conserving
  - maximizing NSW_OT  =>  PO_OT, Proportionality Over Time, and
    Corollary 4.0.1: minimizes PROD_i rho_i; equal budgets => rho_i <= 1
  - under uncertainty, extends to MNSW_OTE (max NSW over time in expectation)

Component 2: Bayesian adaptation predictor   [forecast]
  - regime R = (c, f): config c (batch size), duration f (fraction of epochs)
  - trajectory = sequence of regimes; only duration is random
  - Dirichlet prior Dir(N/K, ..., N/K)
  - RESTATEMENT RULE posterior:
      Dir(m_1, ..., m_k, S_k, ..., S_k),  S_k = (N - SUM m_k) / (K - k)
    (updates only completed epochs; assumes remaining regimes split evenly)
  - keeps ONE trajectory per job = posterior mean, for tractability

Component 3: Schedule solver + estimators   [systems]
  - long-term FAIRNESS estimator -> FTF rho-hat per job  (Eq. 9)
  - long-term EFFICIENCY estimator -> makespan lower bound H  (Eq. 10)
  - generalized Nash social welfare, solved by Gurobi

Solver objective (Equation 2):

Maximize over X: ( Σ_{j=1..N} ρ̂(j)^k · log Σ_t UTIL_j(X[j,t]) ) / (N·M) − (λ · H(X)) / Z₀

Fairness metric used throughout — Finish Time Fairness:

ρ(G) = t_schedule / t_egalitarian, where t_egalitarian = t_exclusive · N

ρ > 1 means the job was scheduled unfairly.


Experimental Setup

Component Value
Cluster 32 GPUs, 8 nodes, on TACC
GPUs per node 4 × NVIDIA Quadro RTX 5000 (16 GB GRAM)
CPU per node 2 × Intel Xeon E5-2620 v4 "Broadwell"
RAM per node 128 GB DDR4
Network 200 GB/s inter-switch, 100 GB/s inter-node (as stated in the paper)
Round duration 2 minutes
Solver Gurobi, 15 s timeout, separate thread
Workloads ResNet-50/ImageNet (16–128), ResNet-18/CIFAR-10 (16–256), LSTM/Wikitext-2 (5–80), Transformer/Multi30k (16–256), Recoder Autoencoder/ML-20M (512–8192)
Trace Gavel workload generator; jobs 0.2–5 h; 1/2/4/8 workers; Poisson arrivals λ ∈ [0.1, 0.2]; also a Pollux production trace
Job mix Small 0.2–8 GPU-h (0.72), Medium 8–16 (0.20), Large 16–72 (0.05), XL >72 (0.03)
Job modes Static, Accordion, or GNS
Baselines OSSP, AlloX, Themis, Gavel, MST, Gandiva-Fair, Pollux
Metrics Makespan and utilization (efficiency); worst-case FTF ρ and fraction with ρ > 1 (fairness); average JCT (responsiveness)
Simulation 64 GPUs / >220 jobs, 128 / >460, 256 / >900, contention factor ≈ 3

Simulator fidelity vs. the physical cluster: makespan 4.97%, average JCT 4.62%, unfair fraction 3.83% — roughly 5% divergence, using the same scheduling code base and solver engine.


Headline Quantitative Results

Motivating measurements (why reactive scheduling fails):

Predictor accuracy: regime-duration modeling error averages 6%, yielding 84% accuracy in run time prediction, with no prior training and only epoch-progress observation (200 Accordion/GNS jobs from the Gavel trace).

Physical cluster — 32 GPUs, 120 jobs (relative values, Shockwave = 1.0):

Scheduler Makespan Average JCT Worst FTF (ρ) Unfair Job Fraction
Shockwave 1.0 1.0 1.0 1.0
OSSP 1.01 1.7 3.17 8.5
Themis 1.24 1.04 1.56 2.0
Gavel 1.37 1.15 1.9 3.2
AlloX 1.27 0.91 2.54 3.0
MST 1.37 0.92 2.85 3.0

Simulation at scale (64–256 GPUs, 220–900 jobs):

Baseline Shockwave makespan speedup
Themis 1.26 – 1.35×
Gavel 1.30 – 1.34×
AlloX 1.35 – 1.37×
Gandiva-Fair 1.21 – 1.30×
OSSP Shockwave is 5–9% worse

Wins scale with dynamism. With all jobs static, Shockwave holds the unfair fraction < 5% (baselines < 18%) and improves makespan 18% with no JCT loss. As the dynamic-job fraction grows from 0.4 to 1.0, the makespan speedup over Gavel/Themis/AlloX rises to 1.3×; with all jobs dynamic, Themis schedules 28% of jobs unfairly and AlloX 22%, versus Shockwave's 9%.

Versus Pollux (same trace, same batch size schedule). Pollux wins average JCT by because it scales worker counts and thereby reduces requested GPU hours per job by 2.4×; Shockwave holds worker counts fixed and so inherits 2.4× more contention. Makespan is similar, FTF is substantially better for Shockwave, and Pollux's auto-tuning costs 2% accuracy on ResNet18 and up to 4% on DeepSpeech.

Robustness and overhead. With ±100% noise injected into predicted run times, worst-case FTF is only 1.51× the oracle and average JCT 1.06×, though makespan degrades 1.36× (efficiency drops >30%, still on par with baselines). Solver bound gap at a 15 s timeout is 0.03% / 0.11% / 0.44% for 500 / 1000 / 2000 active jobs, and overall solver overhead stays < 12.5% of a two-minute round.


Limitations


Open Problems Called Out

  1. Extending the predictor beyond Accordion and GNS to other gradient-state-driven batch sizing policies.
  2. Re-parameterizing the Volatile Fisher Market so it allocates worker counts, not just time slices.
  3. Supporting fairness metrics other than FTF — the market can encode priorities as budgets (weighted proportional fairness), but only FTF is evaluated.
  4. Multi-resource allocation: VFM formally supports GPUs and CPUs, yet the evaluation covers only GPU allocation.
  5. Finding a trustworthy adaptation signal — the authors report Pollux's statistical efficiency metric can be incorrect for Neural-MF models.