Simulation, numerics and systems
gpu-fleet-scheduling
On a fleet that mixes old and new GPUs, how much sooner do jobs finish when the scheduler knows which job runs best on which GPU type?
Answer
At benchmark GPU speeds, a lot; by the trace's own run times, little. Replaying the Alibaba PAI trace (6,742 GPUs of five types) with per-type speeds from published benchmarks, sending each job to its fastest free GPU type cuts the mean job completion time by 53 % (95 % CI 52 to 54 %) against a type-blind scheduler, from 83.3 to 39.3 minutes, lower in 10 of 10 paired seeds. With every speed gap halved the gain is still 30.5 %. But the trace's repeated jobs barely show those gaps: where one ran on both an old K80-class GPU and a P100 (9,241 jobs), its median run took 1.01 times as long on the old one, while the benchmarks predict 3.10. Replayed with the gaps shrunk to the power 0.1 (one is the full benchmark gap, zero none), still a little more than such jobs show, the gain is 6.7 %.
How it was measured
- A discrete-event simulator: an event queue, GPUs shared in percent as in the trace, best-fit packing, and the policies. Each job has a fixed amount of work; on a GPU type it runs at that type's speed for its job type.
- Before any policy comparison, the simulator runs as a plain queue against exact results: M/M/1, M/M/c (Erlang C) and M/D/1 (Pollaczek-Khinchine). All 5 cases land within one standard error, and Little's law holds.
- Ten seeds replay ten separate two-day windows of the trace, with every job and the whole fleet. Changes are paired per seed with a bootstrap interval.
- Almost none of the gain comes from shorter queues: at the trace's own load the mean wait is under a second either way. The gain is placement on faster GPUs.
- To test the speed table, every successful run whose GPU tasks all ran on one type is keyed by its PAI group tag (same entry script, parameters and data) and its GPU request. For each key and each pair of types it ran on, the ratio of its median run times is set against the ratio the table predicts, and one exponent sums up how much of the predicted gap shows.
Proof
Every file is pinned to the commit the numbers come from, so the links cannot drift.
Reproduce it
pip install -r requirements-dev.txt
python scripts/download_trace.py
python -m fleetsim.trace
python -m fleetsim.validate
python -m fleetsim.experiments
python -m fleetsim.calibrate
python scripts/make_tables.pyThe trace download is checked against the published checksums. CI runs the tests, checks that the README tables match the result files, runs every experiment on a committed six-hour sample of the trace, and runs the calibration on a committed sample of repeated jobs.
Limits
- The trace does not say how fast a job would have run elsewhere, so the speed table comes from benchmarks. I checked it against the trace: fitted to the run times of 11,519 repeated jobs that ran on two or more GPU types, the gaps come out at the power -0.12, and for long runs of one task and one instance at +0.05 (95 % CI +0.02 to +0.09). Why these jobs barely sped up on faster GPUs is open, and the runs of one job on different types need not have had the same inputs.
- No network topology and no interference between jobs that share a GPU.