30/34
Part 5 of 5 · Spot, failures and metricsLearn and do
What interviewers ask next
A 64-GPU job has waited six hours while small jobs keep starting. Why, and what do you change?
Say the mechanism. The cluster has enough free GPUs in total, but never 8 empty nodes at once, because each node that drains is refilled by small jobs. Check the fragmentation delay metric to confirm it.
Then the fixes, in order:
- Pack small jobs.
- Give the big job a reservation on the nodes that drain soonest.
- Backfill only work that ends before the reservation.
- At reservation time, preempt best-effort work on those nodes if it checkpoints.
Add aging, so a waiting job gains priority over time. Alert when any job's wait passes a threshold for its size.
A production retrain was preempted at 90% done and started over. What went wrong?
Three failures in one:
- It should have been in a band that standard work can't preempt.
- It should have checkpointed every few tens of minutes, not only at the end.
- The victim rule should have counted lost GPU-hours.
Then the follow-on fix: resume from the checkpoint on new nodes automatically, and alert on any production job that loses more than an hour of work.
In the editor, write aged(priority, waited, per_hour) and next_job(queue, per_hour). QUEUE holds the 64-GPU job that waited six hours, and two small trials with a higher priority.