Preemption and victim selection
Release the right feasible resources while accounting for disruption, checkpointing, lost progress, and policy boundaries.
On this page
The question for today
What you’ll understand
- Check whether proposed victims actually make a placement feasible.
- Compare disruption cost in explicit resource-time units.
- Explain the scope and limits of disruption-budget protection.
An urgent inference deployment needs four GPUs, but every device is allocated to training. Preemption can create space by interrupting lower-priority work. Choosing victims is not simply a sort by age or job count: the released resources must form a feasible placement, and each interruption can destroy progress, delay users, or violate an intended availability policy. A useful decision explains both the resources gained and the costs imposed.
Begin with feasibility and policy eligibility
Identify which workloads may be preempted under the configured priority, queue, and protection rules. Then evaluate whether removing a candidate set releases the required device types, host resources, and topology. Four GPUs spread across incompatible domains may not help a four-GPU single-host request. Killing a low-priority job that cannot make the incoming job feasible creates disruption without achieving the purpose. Account for resources that remain owned during graceful termination or controller cleanup rather than assuming they are immediately reusable.
A victim’s termination can be delayed, fail, or be superseded by another scheduling decision. The selected incoming job is not automatically guaranteed to bind once a victim is nominated. Keep event traces linking the preemptor, victims, resource release, and eventual admission outcome. Bound repeated preemption loops so one job does not continually evict another without either making useful progress. These problems are policy and lifecycle issues as well as combinatorial selection problems.
Measure the cost rather than only victim count
Training interruption cost includes checkpoint or suspension overhead, restore time, and work that must be replayed from a valid saved state. A fresh successful checkpoint can reduce lost progress, but it consumes time, bandwidth, and storage and may contend with other victims. Validate what state a checkpoint contains, including optimizer and data-position state when needed. Calling a file a checkpoint does not prove that restarting reproduces the intended training computation or avoids duplicated external effects.
Availability protection also has a scope. Kubernetes PodDisruptionBudgets guide voluntary disruption mechanisms, and scheduler preemption attempts to avoid violations but does not provide an unconditional PDB guarantee. They do not prevent every involuntary failure or replace application-level capacity planning. A training gang may need protection for its useful membership rather than a simplistic replica count. Check the platform’s documented behavior and the workload controller’s recovery rules before treating a budget as an absolute prohibition on interruption.
Confirm benefit after the interruption
Compare the incoming workload’s urgency and expected benefit with the full victim cost. A policy can include maximum interruptions per job, protected service classes, or checkpoint-age thresholds, but each needs observable enforcement. Record useful progress lost and time to successful resume. Reporting only that higher-priority work started can hide a large training-efficiency regression. Evaluate whether another action, such as waiting briefly for a completion or using a different compatible flavor, achieves the goal with less disruption.
Use the reliability lab for a count-only protection illustration. Reset, set replica count to 5 and unavailable count to 1, predict available replicas, then Step. Compare a new Reset with both replica count at 5 and unavailable count at 2. On paper impose an application minimum of four available replicas. The second case still has a majority of three but fails that application minimum. The instrument implements only majority counting, not PDB enforcement, preemption, checkpointing, or application capacity.
Work it through
Fewer victims can cost more
An incoming job needs four compatible GPUs in one eligible domain. Candidate A owns four and has a modeled total interruption penalty of 120 seconds per GPU. Candidates B and C each own two and each has a 60-second per-GPU penalty. Either A alone or B and C together makes placement feasible; assume equal policy eligibility.
Preempting A releases four GPUs and costs 4 × 120 = 480 GPU-seconds in the stated model.
Preempting B and C also releases four GPUs but costs 2 × 60 + 2 × 60 = 240 GPU-seconds. This is four GPU-minutes, versus eight for A.
The model favors two victims despite their larger count. Before acting, check concurrent checkpoint bandwidth, fairness, disruption protection, and whether the assumed penalties describe the actual restart path.
Minimizing victim count and minimizing modeled lost resource-time can select different sets. Neither alone establishes the complete policy choice.
The living notebook
Explore the model
Interactive lab · reliability
Majority differs from an application minimum
Reset, set replica count n = 5 and unavailable count k = 1, predict available replicas, then Step. Compare a fresh Reset with both n = 5 and k = 2. Evaluate an application minimum of four on paper; the lab itself only tests majority.
- Available replicas
- 4 of 5
- Majority needed
- 3
- Majority available?
- Yes
A replica count and a majority threshold, without a consensus protocol. Playback highlights fixed replica states. Having a majority alone does not establish linearizability, durability or failure independence. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forAn application disruption requirement is not automatically the same as a majority threshold.
Pause & reason
Check your understanding
Your turn
Try it yourself
A three-GPU job has a modeled per-device interruption penalty of 40 seconds, while two alternative victims each use one GPU with a 15-second penalty. An incoming request needs all three GPUs, and no others are free. Compare costs and explain why the cheaper pair alone is insufficient.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Calculate released quantity separately from interruption cost.
Compare with the solution
The three-GPU victim costs 3 × 40 = 120 GPU-seconds and releases three. The pair costs 2 × 15 = 30 GPU-seconds but releases only two, so it does not meet the request. A low-cost infeasible set is not a valid alternative. Adding another eligible victim or choosing another placement requires a new complete feasibility and policy check.
Keep the idea
Take it with you
- Victims must release compatible resources in a placement the incoming workload can use.
- Interruption cost includes saved-state and restart behavior, not only victim count.
- Disruption budgets and preemption policies have documented limits and lifecycle boundaries.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.