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

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

Per-section summary organized by the paper's own headings. Every paragraph produces at least one bullet; all quantitative tables, equations, and named methods are preserved.


Abstract


1. Introduction


2. Motivation

2.1 Jointly Optimizing Fairness and Efficiency

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

t_schedule = job finish time under policy G; N = number of contending jobs; t_exclusive = run time when running exclusively with requested resources. ρ > 1 → unfair; ρ ≤ 1 → fair. The market formulation extends to other metrics — unequal budgets give weighted proportional fairness with budgets encoding priorities.

Table 1 — Themis filter toy example (3 jobs):

Filter f Worst FTF-ρ SI Avg. JCT Makespan
Adaptive (1 → 1/3 → 2/3) 0.83 5 7
Fixed 1/3 1.0 5.7 7
Fixed 2/3 1.1 5.7 7
Fixed 1 1.1 6.0 7

2.2 Handling Dynamic Batch Size Scaling

2.3 Supporting User-defined Dynamic Adaptation


3. Overview


4. Dynamic Market Theory Formulation

4.1 Volatile Fisher Market (VFM)

4.2 Equilibrium Properties

Cluster-level performance — NSW_OT (Equation 1):

NSW_OT(U₁(X₁), …, U_N(X_N)) = ∏_i U_i(X_i)^(B_i / Σ_i B_i), where U_i(X_i) = Σ_t u_it(x_it)

The equilibrium of the Volatile Fisher Market with linear or Leontief utility at each instant (a) minimizes the product of FTF (ρ) across all jobs, i.e. ∏_i ρ_i; (b) when the budgets assigned to jobs are equal, the equilibrium provably guarantees Sharing Incentive (SI), i.e., all jobs' FTF ρ are no greater than 1, i.e., ρ_i ≤ 1, ∀i.

4.3 Handling Uncertainty


5. Predicting Dynamic Adaptation

Dir(m₁, …, m_k, S_k, …, S_k), where S_k = (N − Σ_k m_k) / (K − k)


6. Shockwave Design

System flow (Figure 6):

  (1) new job arrives
        |
        v
  +--------------------------+       (2) epoch completion / batch-size scaling
  |   Bayesian Predictor     |  <----------------------------------------------+
  |   Dirichlet prior; adds  |                                                 |
  |   job to active pool     |                                                 |
  +--------------------------+                                                 |
        |  (3) posterior update via restatement rule                           |
        v                                                                      |
  +--------------------------+                                                 |
  | Dirichlet Posterior      |--- forecast future batch-size schedule -----+   |
  | Model                    |--- predict (remaining) run time ---------+  |   |
  +--------------------------+                                          |  |   |
        (4) Long-term EFFICIENCY estimator -> makespan lower bound H  <--+  |   |
        (5) Long-term FAIRNESS  estimator -> FTF rho-hat per job      <--+  |   |
                                |                                           |   |
                                v                                           v   |
  +-----------------------------------------------------------------------------+
  | (6) SCHEDULE SOLVER : generalized Nash social welfare                        |
  |     weights = FTF^k   |   regulariser = makespan estimate H                  |
  |     output: N x T binary schedule matrix X  -->  Cluster Manager launches    |
  +-----------------------------------------------------------------------------+

6.1 Schedule Solver

Objective (Equation 2):

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

6.2 Long-term Fairness and Efficiency Estimators


7. Implementation


8. Evaluation

8.1 Experiment 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 (default)

Workload (Table 2):

Model Task Dataset Batch Size(s)
ResNet-50 Image Classification ImageNet 16 – 128
ResNet-18 Image Classification CIFAR-10 16 – 256
LSTM Language Modeling Wikitext-2 5 – 80
Transformer Language Translation Multi30k (DE-EN) 16 – 256
Recoder Autoencoder Recommendation ML-20M 512 – 8192
Job category GPU-hours Probability
Small 0.2 – 8 0.72
Medium 8 – 16 0.20
Large 16 – 72 0.05
Extra Large > 72 0.03

8.2 Baseline Schedulers

Baseline Role Mechanism
OSSP Efficiency baseline (makespan) Minimizes makespan via MILP; no fairness guarantee
MST Efficiency baseline (throughput) Maximizes instantaneous cluster-level summed throughput
Gavel Fairness baseline Max-Min Fairness within each allocation round
AlloX Fairness + responsiveness baseline Minimizes average JCT via maximal bipartite matching
Pollux Responsiveness baseline Maximizes cluster-wide goodput; p-norm of job goodput, tuning p to penalize unfair allocations
Themis Fairness + efficiency baseline Partial Allocation; default filter value used
Gandiva-Fair Fairness + efficiency baseline Lottery scheduling for proportionally fair share; work-conserving

8.3 Evaluating Efficiency and Fairness — Physical, 32 GPUs, 120 Jobs

Figure 7 — relative values versus Shockwave (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

8.4 A Closer Look at Shockwave's Schedule (50 jobs)

Jobs are categorized by GPU-time into (X)Large, Medium, Small, (X)Small.

8.5 Scaling to Large Clusters

Simulation fidelity (Table 3) — difference between simulator and physical cluster:

Metric Difference
Makespan 4.97%
Average JCT 4.62%
Unfair Fraction 3.83%

Efficiency at scale (Figure 9):

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

8.6 Benefits of Proactive Scheduling (varying static/dynamic job mix)

8.7 Shockwave versus Pollux

8.8 Varying Cluster Contention and Workload

8.9 Solver Overhead

Active jobs Relative bound gap at 15 s
500 0.03%
1000 0.11%
2000 0.44%

8.10 Resilience to Prediction Error

Figure 13 — relative values (Oracle = 1.0):

Condition Makespan Average JCT Worst FTF (ρ) Unfair Job Fraction
Oracle 1.0 1.0 1.0 1.0
0% noise 0.99 1.01 1.01 1.5
20% noise 1.14 1.01 1.11 1.67
40% noise 1.22 1.03 1.04 2.0
60% noise 1.23 1.03 1.07 3.0
100% noise 1.36 1.06 1.51 3.5


10. Conclusion


Appendices

Appendix A — Dynamic Batch Scaling Degrades Accuracy

Appendix B — Static Filters Degrade Efficiency and Fairness

Appendix C — Volatile Fisher Market Formulation

Theorem C.1:

For Volatile Fisher Market with linear or Leontief (e.g., DRF) utility, the solution of (3) captures the optimal allocation in the market equilibrium and the Lagrangian dual to capacity constraints (i.e., Σ_i x_ijt ≤ 1, ∀j,t) captures the equilibrium price.

Appendix D — Proof of Theorem C.1

Appendix E — Proof of Corollary 4.0.1

Appendix F — Stochastic Dynamic Program (Efficiency and Fairness in Expectation)

Appendix G — Shockwave Design Details

G.1 — Implementing NSW over time (Equations 7, 8):

UTIL_j(Y_j[·,·]) = F_j / E_j + Σ_{t=1..T} Σ_{k=1..K} ( Y_j[k,t] · D · TH(j,k) ) / ( Q_j · E_j )

WELFARE(Y[·,·,·]) = Σ_{j=1..N} log UTIL_j(Y_j[·,·])

G.2 — Estimators for long-term effects. Maximizing welfare over an infinite horizon is infeasible (compute cost, limited predictability, online arrivals forcing replanning), so Shockwave plans a finite window (e.g. 30–60 minutes) plus estimators.

ρ̂(j) = ( L_j + W_j + R̂(j) · N_avg(j) ) / ( P̂(j) · N_avg(j) ) (Equation 9)

H(Y[·,·,·]) = max{ ( Σ_j R(Y_j[·,·]) ) / M , max_j R(Y_j[·,·]) } (Equation 10)

G.3 — End-to-end schedule optimizer (Equation 11):

Maximize over Y₁,…,Y_N: (1 / (N·M)) · Σ_{j=1..N} ρ(j)^k · log[ UTIL_j(Y_j[·,·]) ] − (λ / Z₀) · H(Y₁[·,·], …, Y_N[·,·])

Appendix H — Constraints of Program 11

  1. Preserving the order of regimes — no regime may run before its precedent regimes complete.
  2. Work-conserving (market clearing) — idle resources not allowed when ready jobs exist.
  3. Capacity limits — GPUs assigned to jobs must not exceed total provision.

Appendix I — Varying Contention Factor (14-GPU physical cluster)

Contention factor Makespan improvement over Gavel/AlloX/Themis Cluster utilization improvement
3 35% (reported as a similar trend)
2 19% 19%
1.5 8% 5%

Appendix J — Varying the Cluster Trace (Pollux trace, 32 GPUs)


Limitations


Open Problems Identified by the Paper

  1. Support for more dynamic adaptation policies. The authors explicitly plan to extend the predictor beyond Accordion and GNS to other gradient-state-driven batch sizing policies (§5).
  2. Worker-count elasticity within the market. Re-parameterizing VFM to also allocate worker counts (not just time slices) is stated as possible but left unimplemented (§8.2).
  3. Other fairness metrics. The market can support weighted proportional fairness by encoding priorities in budgets, but only FTF is evaluated (§2.1).
  4. Multi-resource allocation. VFM formally supports multiple resource types (GPUs and CPUs), yet evaluation covers only GPU allocation (Appendix C).
  5. Trustworthy adaptation signals. The authors report that Pollux's statistical efficiency metric can be incorrect for Neural-MF models, leaving open the question of a reliable signal for deciding when to adapt (§2.3 footnote, Appendix A.2).