advanced25 min studyLesson 366 in Engineering

Preemption and victim selection

Release the right feasible resources while accounting for disruption, checkpointing, lost progress, and policy boundaries.

On this page

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.

∀r,fr+∑j∈Vqjr≥qnew,r\forall r,\qquad f_r+\sum_{j\in V}q_{jr}\geq q_{\mathrm{new},r}
Victim set V releases requested resources q_jr into initially free quantity f_r for the incoming request. This aggregate condition is necessary only; topology, eligibility, release completion, and per-node fit remain required.↔ Scroll wide equations horizontally.

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.

C(V)=∑j∈Vgj δjC(V)=\sum_{j\in V}g_j\,\delta_j
Here g_j is allocated GPUs and delta_j the measured or assumed per-device interruption penalty in seconds, giving GPU-seconds. This illustrative additive cost excludes fairness, concurrent checkpoint contention, and latency criticality; minimizing it is not a complete victim policy.↔ Scroll wide equations horizontally.

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.

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.

  1. Preempting A releases four GPUs and costs 4 × 120 = 480 GPU-seconds in the stated model.

  2. 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.

  3. 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.

The result

Minimizing victim count and minimizing modeled lost resource-time can select different sets. Neither alone establishes the complete policy choice.

Explore the model

Interactive lab

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.

Majority differs from an application minimumA 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. Current readings: Available replicas: 4 of 5; Majority needed: 3; Majority available?: Yes. All parameters are adjustable with the labeled controls below.Majority available · need 3 of 5Playback highlights fixed statesR1 · upR2 · upR3 · upR4 · upR5 · downCyan mark: majority threshold
AvailableUnavailableMajority threshold
Available replicas
4 of 5
Majority needed
3
Majority available?
Yes
t = 0 s

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.

Check your understanding

A victim set releases enough total GPUs but none of the remaining hosts can satisfy the incoming job’s single-host requirement. What should the scheduler conclude?

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.

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.