3/34
Part 1 of 5 · The round and the clusterLearn and do

Who shares the cluster, and what each job asks for

Before any queue, know who submits work, and what each kind of work wants.

Five kinds of work want different things

WorkloadShapeDurationWantsTolerates
Distributed training8 to 256 GPUs that must start togetherhours to weeksall GPUs at once, close togetherwaiting in the queue, restarts from a checkpoint
Batch inferencethousands of independent 1-GPU shardsminutes per shardthroughput and a deadlinepreemption of single shards
Hyperparameter sweepshundreds of small trialsminutes to hoursmany GPUs cheaplypreemption, spot capacity
Notebooks1 GPU, interactivea working day, mostly idleto start in under a minutenot much
CPU jobs (features, Spark, data prep)many CPU-only tasksminutes to hoursCPU and memorylanding on CPU nodes only

Name these differences before you draw anything. A training job can't start until all of its GPUs can. A sweep takes whatever is cheap and spare. A notebook wants a GPU right now and then barely uses it.

Four needs cut across all five:

  • Mixed hardware. Several GPU generations and node shapes, and jobs that can run on more than one. The authors of Gavel, a scheduler built for this, found that an accelerator's speed depends on the model's architecture. The newest GPU can speed one model up far more than another.
  • Team quotas. Each team is guaranteed a share and wants to borrow idle capacity.
  • Priorities and deadlines. A production retrain that feeds tomorrow's homepage beats a research sweep.
  • Utilization. Idle GPUs are the expensive mistake.

In the editor, write start_together(job) and preemptible(job): the table's Shape and Tolerates columns as code. Each dict in JOBS is one kind of work, with its GPUs and, for training, whether it checkpoints.