Optional workbooksOptional workbooks · 14 min
GPU job and checkpoint economics
Account for useful work, checkpoint overhead and lost work under interruption.
A checkpoint saves completed progress so a job can resume there after interruption. Saving takes overhead time without advancing useful computation. Frequent saves lose less work on failure but incur more overhead. Compare policies for the same twenty hours of useful work, charging all elapsed computation and save time.
The model splits work into chunks. Suppose a 2-hour chunk fails after .6 hours, then the retry finishes in 2 hours and pays .05 hours to checkpoint: elapsed time is .6+2+.05=2.65 hours for 2 useful hours. An unsuccessful attempt loses that chunk's progress. The final successful chunk also pays overhead by convention; checkpoint saves themselves cannot be interrupted here.
Each complete-job trial uses retries until all useful chunks finish. Exponential interruption times have constant hazard, the conditional interruption rate while still computing; their supplied mean is 8 compute hours, so the hazard is 1/8 per compute hour. Shared uniform inputs match corresponding attempts across policies. Bill elapsed time at the invented hourly rate, with no restart delay and an attempt cap that fails visibly if exhausted. Real throughput, failures and pricing need evidence.
- Useful work is fixed
- Add checkpoint overhead
completed checkpoints
- Include failed attempts
Will the shortest checkpoint interval always minimise billed time?
Write a prediction (optional)
Seeded teaching simulation
Select Run Python below with the code unchanged.
A saved draft is open. To run the published example, open Tools and select Restore example. Recover draft brings your code back.
Execution error
Technical error details
Your result
Published example output
This result comes from the original Python. Your runs appear above. Build environment ↗
Chunk (h): 0.5 mean billed £: 67.88 P90 completion (h): 23.26 mean interruptions: 2.54 Chunk (h): 2.0 mean billed £: 69.49 P90 completion (h): 26.0 mean interruptions: 2.8 Chunk (h): 5.0 mean billed £: 83.7 P90 completion (h): 36.31 mean interruptions: 3.43
Read the first result
Elapsed time includes failed attempts and successful checkpoint overhead. Useful completed work remains exactly 20 hours for every policy.
Try an edit
Replace checkpoint_hours, rate = .05, 3.0 with checkpoint_hours, rate = .25, 3.0. Select Run Python again. Compare mean billed £ and P90 completion (h) by Chunk (h). Which chunk size adds the most checkpoint overhead when each save takes longer?
Scope. The model assumes constant throughput, exponential compute-only interruptions, interruption-free checkpoints, no restart delay and a flat invented price.
Try a fresh case
What must remain equal for this checkpoint-policy comparison?
Need a hint?
Hint 1
Separate completed useful work from repeated or checkpoint work.
Hint 2
The comparison concerns the cost of delivering the same useful result.