[2020 NSDI] Themis: Fair and Efficient GPU Cluster Scheduling
One-line Summary
The authors present a new fairness metric, finish-time fairness, and a newer scheduler architecture and API that supports resource division according to the metric.
Paper Structure Outline
Introduction
Motivation
Preliminaries
Characterizing Production ML Apps
Our Goal
Finish-Time Fair Allocation
Fair Sharing Concerns for ML Apps
ML Task Durations
Placement Preferences
Metric: Finish-Time Fairness
Mechanism: Partial Allocation Auctions
One-Shot Auction
Multi-round auctions
System Design
Design Requirements
THEMIS Scheduler Architecture
Need for a new scheduling architecture
Two-Level Semi-Optimistic Scheduling
AGENT and AppScheduler Interaction
Single-Job ML Apps
Generalizing to Multiple-Job ML Apps
End-to-end Example
Implementation
Evaluation
Experimental Setup
Macrobenchmarks
Sources of Improvement
Effect of Contention
Systems Overheads
Microbenchmarks
Sensitivity Analysis
Related Work
Conclusion
Background & Motivation
In large GPU clusters, existing scheduling disciplines do a poor job in fair sharing.
The authors presented the Sharing Incentive (SI): "If N deep learning apps are sharing a cluster, then no application should run slower than on a private cluster with 1/N resources". Similar fairness metrics include Pareto Efficiency (PE) and Envy-Freeness (EF).
Existing cluster scheduling frameworks are not adequate:
Dominant Resource Fairness (DRF): The metric is "application resource share". It only uses instantaneous resource fairness (whenever resources are available, they are allocated to the task with the least current share). This is fine for big data analytics workloads, where task durations are short. For ML apps, though, running long, resource-intensive, gang-scheduled tasks might lead to newly-arrived jobs waiting, which is a violation of SI. Also, DRF does not take into account the placement preferences of ML apps. Modern ML apps have vastly different model architectures and placement preferences. For example, VGG16 is affected greatly by the hardware placement, while Inception-v3 is not. This is due to the difference in the amount of communication and synchronization for different workloads.
Least Attained Service (LAS, Tiresias uses this): The metric is "app attained service, #GPUs * time". In Tiresias, GPUs are leased for a certain duration, and when leases expire, available GPUs are given to the job that received the least GPU time thus far. While this resolves the starvation issue mentioned above, it fails to address the placement issue: For two (sparse vs. dense) placements, Tiresias considers them to be the same as the attained service is equal, while actually, a poor placement leads to a slower execution time.
Design and Implementation
Metric
Interface
Mechanism
SI's focus is minimizing the max rho: min(max(rho))
Strawman Mechanism: When resources are available, the interface gets rho estimates from all apps, and then allocates the resources to the app with the highest rho for lease duration. There are two drawbacks (compared with Themis):
May not find the most efficient allocation: It indeed allocates resources to the job that needs resources the most, but the job might not be the one that can utilize the resource the best.
Cannot handle applications that lie about high rho values: Applications have the incentive to lie with high rho values to hoard GPU resources, which leads to starvations of honest jobs.
Themis introduces a knob, f, that manages a tradeoff between SI and efficiency.
Solving inefficient allocation: When f = 0, more applications are allocated resources and, as a result, get better opportunities to match placement preferences of apps to resources. Analysis suggests f = 0.8 gives a good tradeoff.
Incentivizing truth-telling of rho: Partial Allocation Auction within 1-f apps.
Evaluation
Baseline frameworks for comparison:
Tiresias: Least Attained Service Job First
Optimus: Best Throughput Scaling First
Gandiva: Best Packing Job First
SLAQ: Best Loss Gradient Job First
From Figure 9, we can observe a few things:
Some apps perform very poorly with Tiresias due to placement inefficiency
Themis is fair (rho <= 1.2)
Themis is minimizing the max rho compared to other algorithms
From Figure 19, we can observe:
In general, increasing f (filtering out more jobs) increases fairness and decreases max rho
Increasing f gives us fewer scheduling choices, so it decreases GPU performance
Short lease -> switch more rapidly between different jobs -> fairer
New Vocabulary
Hyperparameters: Data that govern the training process itself. Hyperparameters are set before the learning process begins. For example, the number of hidden layers, the number of nodes each layer should use, etc.
Hyperparameter tuning: The process of finding the best values of the hyperparameters.
Links
Last updated