Checkpoint economics: state the failure model before optimizing
Derive a first-order checkpoint interval and fictional expected resource cost while identifying the assumptions that break the approximation.
On this page
The question for today
What you’ll understand
- Separate useful compute interval from wall-clock checkpoint period.
- Derive a first-order checkpoint overhead tradeoff with consistent units.
- Identify job-level hazard, recovery, and durability assumptions behind expected cost.
Frequent checkpoints spend time writing state; infrequent checkpoints risk losing more work after an interruption. The balance depends on the failure process and what a recoverable checkpoint actually contains. All prices here are explicitly fictional stable teaching inputs in fictional credits, FC. We derive a deliberately first-order engineering approximation, informed by original checkpoint research rather than presented as an exact universal formula. Its interval is useful computation between checkpoints, not the full wall-clock period including the checkpoint. Correlated failures, variable checkpoint cost, and unreliable state publication require a richer model.
Define the time variables and the failure boundary
Let C be checkpoint overhead time and τ the useful compute accumulated between checkpoints, both in hours. Let λ be the stationary job-level interruption rate per hour, with independent Poisson arrivals and rare interruption overhead in the approximation. R is restart time. A many-device job’s λ is not automatically one device’s hazard: independent component failures, redundancy, correlated outages, and job restart policy determine the relevant process. Record whether all allocated resources remain billed during checkpointing, lost work, restart, and provisioning delays.
Under the first-order model, an interruption loses about half the useful interval on average. This uses an approximately uniform failure phase and neglects higher-order interactions, including repeated interruption during recovery or checkpointing. Checkpoint overhead per useful hour is approximately C/τ. Restart contributes λR. These terms describe an overhead ratio relative to useful computation, not an exact fraction of wall time. The original literature develops more detailed models and interval conventions; keeping those conventions explicit avoids adding checkpoint time twice or applying one paper’s formula to another variable.
Optimize only the terms that the interval controls
For positive checkpoint time and hazard, differentiating the interval-dependent terms balances checkpoint overhead against lost useful work. The stationary point is a minimum because the second derivative of C/τ is positive. A constant restart contribution does not move that optimum in this simple approximation, though a more complete model can couple restart and failure exposure. If hazard is zero, the stated positive-hazard optimum does not apply. Practical checkpoint schedules also obey wall-time limits, storage bandwidth, minimum durability requirements, and maximum tolerable recovery loss.
A recoverable checkpoint needs a consistent model, optimizer, random state, and data-progress boundary appropriate to the training algorithm. A completed write call or manifest update does not by itself establish atomic durable publication across all required state. Incremental checkpoints, background I/O, and overlapping compute change the cost model. Evaluate storage failures and stale checkpoints explicitly. A nominally cheap interruption-prone pool can lose its advantage through long provisioning delays or repeated progress loss that the rare independent-interruption approximation does not capture.
Translate expected time into cost with explicit exclusions
For a fixed useful-work requirement, multiply its modeled paid resource-time by a fictional rate only after specifying the number of allocated resources and included lifecycle. Add separate storage and transfer categories when relevant. Expected cost is not a completion guarantee or a bound on tail delay; a rare long outage can dominate a deadline even when the mean looks attractive. Check sensitivity to hazard, checkpoint size, restart time, and correlation before making an operational comparison. Preserve quality and recovery correctness rather than optimizing an interval that saves incomplete state.
The probability lab offers an independent-window risk analogy. Reset, explicitly set p=0.02 and n=20, predict, then Play or Step. Compare a separate fresh Reset with p=0.1 and n=20 explicitly set; exact mean affected windows are 0.4 and two. These are hypothetical independent Bernoulli windows, not a Poisson interruption trajectory or a checkpoint schedule. Playback highlights the distribution without generating observed failures. The lab cannot infer MTBF, represent correlated outages, calculate the optimal interval, or prove durable recovery.
Work it through
A first-order checkpoint interval with fictional paid time
For one allocated resource, take checkpoint time C=0.01 hour, job mean interruption time fifty hours so λ=0.02/hour, and restart time R=0.1 hour. All modeled time is paid at a fictional one FC/resource-hour; require 100 useful resource-hours and exclude other charges.
The interval is sqrt(2×0.01/0.02)=one useful-compute hour. The checkpoint takes 36 seconds; the interval variable is not a wall-clock cycle that already includes those seconds.
Checkpoint overhead is 0.01/1=0.01, expected lost-work overhead is 0.02×1/2=0.01, and restart overhead is 0.02×0.1=0.002. Their first-order sum is 0.022 extra time per useful time.
The approximate paid requirement is 100×(1+0.022)=102.2 resource-hours, costing 102.2 FC at the fictional rate. This excludes storage, transfer, checkpoint failures, correlated outages, and higher-order repeated interruption effects.
The approximate one-hour useful interval yields 2.2 percent modeled overhead, not an exact completion-time or spending guarantee.
The living notebook
Explore the model
Interactive lab · probability
Independent risk windows are only an analogy
Use independent Reset → explicitly set BOTH p and n → predict → Play/Step runs for (0.02,20) and (0.1,20), giving mean affected-window counts 0.4 and two. No Poisson process, checkpoint state, cost, or recovery trajectory is simulated.
- Mean · np
- 5
- Variance · np(1−p)
- 2.5
- Total probability
- 1
These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. 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 expected-cost model needs a correct job-level failure and durability model.
Pause & reason
Check your understanding
Your turn
Try it yourself
Use C=0.005 hour and λ=0.025/hour, exclude restart and other costs, and retain the same first-order assumptions. Calculate the useful interval and checkpoint-plus-lost-work overhead.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Compute sqrt(2C/λ), then evaluate the two equal interval-dependent terms.
Compare with the solution
The interval is sqrt(0.4)=0.63246 hour, about 37.95 minutes of useful computation. Checkpoint overhead is 0.005/0.63246≈0.007906 and expected lost-work overhead is 0.025×0.63246/2≈0.007906. Their sum is about 0.015811, or 1.581 percent extra time per useful time in this approximation. The eighteen-second checkpoint is separate from the useful interval. Restart, storage, repeated interruptions, and tail-completion risk remain excluded; adding them may require a richer model rather than merely multiplying this percentage.
Keep the idea
Take it with you
- Define interval conventions and job-level hazard precisely.
- Treat the square-root interval as a scoped first-order approximation.
- Preserve recovery correctness and evaluate unmodeled cost and tail risk.
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.