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.

Account for all time, not only useful work
  1. Useful work is fixed
    20  hours20\;\text{hours}
  2. Add checkpoint overhead

    completed checkpoints

  3. Include failed attempts
    elapsed=useful+overhead+lost work\begin{gathered}\text{elapsed}=\text{useful}\\+\text{overhead}+\text{lost work}\end{gathered}
Reference illustration. The checkpoint workbook repeats interrupted work and includes successful checkpoint overhead. A policy comparison must preserve exactly twenty hours of useful completed work, under the stated interruption model.

Will the shortest checkpoint interval always minimise billed time?

Write a prediction (optional)

Seeded teaching simulation

Select Run Python below with the code unchanged.

Tools
About Python ↗

The code is editable. Press Ctrl+Enter or ⌘+Enter to run Python from the editor.

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?

Back to the Python editor

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?

Choose an answer
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.

Your notes