What is Checkpointing?
Updated: Oct 27

Checkpointing is the process of saving enough of a running computation's state to let it resume from a known point later. After an interruption, a compatible application or recovery tool reads that saved state and continues from the checkpoint, rather than repeating all the work from the beginning.
A checkpoint is useful only if it is complete, available after the failure and actually restorable. A file called “checkpoint” is not proof of any of those conditions. The important test is whether a fresh run can load it and produce the expected continuation.
For remote workers, this separates two problems that often get confused: losing access to a job and losing the job's progress. Reconnecting a terminal restores communication. Checkpointing can restore computation after the original process has stopped, provided the workflow was designed and tested to do so.
What does a checkpoint preserve?
State is the information that determines what the program should do next. In a simulation, that might include positions, velocities, the current step and random-number-generator state. In data processing, it may include which inputs have been completed and the intermediate results needed for the remaining work.
The exact contents depend on the application. Saving a progress percentage alone is usually insufficient: “60% complete” does not describe the internal values needed to calculate the other 40%. Similarly, saving the final-looking output of one stage may not preserve everything necessary to resume the next stage correctly.
A practical inventory can include several kinds of information.
Numerical state, model parameters or other intermediate data.
Iteration counters and the next unit of work to execute.
Random state when the intended continuation depends on it.
Input identifiers, configuration and the checkpoint format version.
Records identifying outputs or external actions already completed.
Keep the program and environment information needed to interpret that state. A checkpoint written by one software version may require that version or a documented conversion path. Being able to read the bytes does not establish that a different program will interpret them correctly.
Checkpointing, backups, retries and persistent sessions
These mechanisms can work together, but they preserve different things. Identify the failure you need to recover from before choosing a mechanism.
Mechanism | What it provides |
Checkpoint | A resumable computation state |
Backup | A recoverable copy of data |
Retry | Another attempt at an operation |
Persistent session | Continued access to a session |
A backup can protect checkpoint files against storage loss, but it cannot invent state the application never saved. A retry may repeat an entire calculation unless it knows how to use saved progress. A persistent remote session may keep an interactive workspace available without providing recovery from a process crash.
The scheduler is another separate component. As explained in What is Job Scheduling?, it manages when work receives resources. Requeuing a job does not, by itself, teach its program how to resume a calculation.
Application checkpoints and process checkpoints
Application-level checkpointing saves the state the program's developers have chosen to expose. It can produce a compact representation tailored to the calculation and may offer a documented restart option. The application must restore the relevant state consistently when it starts again.
For a concrete example, the PyTorch saving and loading guide distinguishes model parameters from a more complete training checkpoint. Resuming training can require optimiser state and progress information as well as the model itself. A weights-only file may be useful for inference without being a complete training restart point.
Process-level tools aim to capture more of a running program's execution state. DMTCP's current maintainer documentation describes checkpointing user-space application binaries without Linux kernel modifications, and directs MPI users towards its MANA plugin. That is a specific tool approach, not a promise that every application, accelerator or network connection can be restored anywhere.
NERSC's checkpoint/restart overview describes the difficulties of supporting changing systems and MPI environments. Treat compatibility as something to verify with the actual software stack and facility guidance. Prefer a supported, tested recovery path over assumptions based on a tool's general description.
How to create a usable checkpoint generation
A useful design treats a checkpoint as a complete generation of related state. If a calculation writes several files, they must describe the same logical point, rather than an accidental mixture of old and new values.
Reach a point where the required application state is consistent.
Capture all components needed to resume that particular point.
Write a new generation without destroying the last known usable generation.
Complete the storage operations required by the application's durability design.
Check completeness and record which generation is ready for restart.
Retain enough earlier state to recover if the newest generation proves unusable.
This is a conceptual workflow, not a universal file-writing recipe. Filesystem behaviour, libraries and storage services differ. Simply renaming a file does not prove that all related data has reached storage or will survive every kind of failure.
If interruption occurs halfway through a new save, a well-designed recovery path can select an earlier complete generation. Overwriting the only good checkpoint in place risks leaving no usable version at all. Make incomplete generations distinguishable from completed ones, and test what the loader does when it encounters one.
A worked example: how much progress is lost?
Consider an original illustrative calculation requiring 120 minutes of useful computing. It saves a checkpoint after each 30 minutes of useful work. Each save pauses computing for two minutes. Assume fixed timings and no other overhead before the interruption.
The first checkpoint completes at wall-clock minute 32, preserving 30 minutes of useful progress. The second completes at minute 64, preserving 60 minutes. The program then performs another 13 minutes of useful work before failing at wall-clock minute 77.
The last complete checkpoint contains the state at useful minute 60. Restarting from it loses the 13 minutes of useful work performed since that point, rather than losing the whole 77 minutes of elapsed time. The earlier four minutes spent saving are overhead, not additional scientific progress stored in the checkpoint.
Now suppose loading the checkpoint takes three minutes. If a suitable allocation is already available and replay takes the same time as before, loading plus repeating the lost work takes 3 + 13 = 16 minutes. That reaches the computation's previous failure point; it does not complete the whole 120-minute calculation.

Queue waiting, copying files to a new machine, repairing the cause of failure and validating results can add more time. These chosen numbers explain the accounting, rather than predict recovery performance on a real cluster. A damaged or inaccessible checkpoint would change the outcome entirely.
Choosing a checkpoint interval
Frequent saves reduce the amount of recent useful work exposed to loss, but they also consume time and storage activity. Less frequent saves reduce that overhead while increasing the work that may need repeating. There is no single interval that is best for every application.
For a simple blocking-save model, divide save time by useful-compute time plus save time to obtain the fraction of a repeating cycle spent saving. With the same assumed two-minute save, the trade-off looks like this.
Useful work per cycle | Cycle time spent saving |
10 minutes | 2 / 12 = 16.7% |
30 minutes | 2 / 32 = 6.25% |
60 minutes | 2 / 62 = 3.23% |
The intervals here measure useful compute time between saves, not wall-clock time between completed saves. That distinction prevents a misleading comparison. A real application may save asynchronously or spend varying amounts of time writing different generations, so this simple model may not describe its overhead.
Choose an interval using measured save time, recovery cost, likely interruptions and the value of the work at risk. Also consider whether many jobs saving together overload shared storage. A fast save in a small test is not a guarantee of the same performance during a busy production run.
Distributed jobs need a coherent recovery point
When several processes cooperate, their saved states must form a valid combined state. One worker's new checkpoint and another worker's older checkpoint may disagree about which messages or shared updates have already been processed.
For example, one process may record that it sent a work item while another records a state from before receiving it. A recovery design must account for that relationship through its supported coordination or message-handling method. Saving each process independently does not automatically solve consistency.
Use the application's or recovery system's documented procedure for the complete job. Record the expected set of files or components for a generation, and verify that the restart sees the whole set. Do not infer that one successfully restored worker proves a distributed computation has resumed correctly.
Changing process count, hardware or library versions may also change what a restart can support. Some application formats permit flexible redistribution; others do not. Confirm the supported restart configuration before depending on moving a checkpoint to a different allocation.
Storage determines which failures you can survive
A checkpoint on a failed node's temporary disk may disappear with the node. A checkpoint on accessible persistent storage may survive that node failure while still being vulnerable to deletion, corruption or a failure of the storage system itself. “Persistent” describes a property within a particular failure boundary, not immunity to every loss.
The University of Surrey's checkpointing guidance emphasises persistent storage, measured checkpoint frequency and testing restart. Its HPC example also explains why saved progress can support continuation across separate job submissions when runtime limits apply.
Decide where the complete generation must exist before you consider progress protected. If you require a second copy, verify that copying has completed before relying on it. Keep retention rules and available capacity visible; an unnoticed quota limit can cause saves to fail while computation continues.
Remote transfer is its own stage. What is Large Dataset Transfer? covers completion and integrity checks for moving data. Broadband can affect the time needed to copy a checkpoint across a wide-area connection; it does not make a partial copy restorable or repair missing application state.
Scheduler integration and runtime limits
Checkpointing can allow a long computation to span more than one allocation, provided each subsequent run follows the supported restart path. It does not extend the current allocation beyond the scheduler's limit or guarantee another allocation will start immediately.
Leave time for a save to finish before a planned stop. A notification shortly before termination is useful only if the application handles it and can complete its save in the available time. An abrupt failure may provide no opportunity for a last-minute checkpoint.
The HTCondor self-checkpointing documentation illustrates the division of responsibility: the executable must create and recognise its checkpoint, while the configured scheduler integration handles transfer and continuation. Its discussion of delayed transfers shows why a file kept only on the execution machine may not protect against every interruption.
Test the exact launch, save, transfer and restart sequence used by your facility. A successful manual restore on a login workstation is not enough to establish that an automated batch restart will use the right files and arguments.
Replayed work can repeat external effects
Checkpointing rolls a computation back to a saved point. An external system may already have accepted something the program did after that point. Repeating the computation can therefore repeat a database update, create another output or send an action twice unless the workflow controls that behaviour.
For example, a processing task might write a completed result and then fail before recording that completion in its next checkpoint. After restoration it sees the task as unfinished. The right response depends on the application: it might detect an existing verified result or use a stable operation identifier to avoid creating another one.
Do not assume that restoring memory also rolls back every filesystem, remote service or physical action. Define which outputs are provisional and which are committed, and make the recovery checks use those definitions. This is especially important when a computation feeds another automated stage.
Test recovery before relying on it
A restore test should exercise the intended failure boundary rather than merely show that a save file exists. Use a small representative workload and keep the original input and expected result for comparison.
Run enough work to create a complete checkpoint generation.
Confirm its recorded generation, components and storage location.
Stop the test process using an authorised, controlled method.
Start a fresh compatible process through the intended restart path.
Confirm it resumes from the saved progress and completes the remaining work.
Compare the final result with the expected result and inspect repeated external effects.
Also test an incomplete newest generation, unavailable files and a deliberately incompatible configuration where feasible. The recovery path should reject unsuitable state clearly instead of silently starting over or loading mismatched components. Record the test result and repeat it when important software or environment details change.
For numerical workloads, decide what “same result” means. A deterministic calculation may permit exact comparison; another may need a justified tolerance or scientific acceptance test. A process reaching its final line is not evidence of valid recovery.
Troubleshooting a failed restart
Use the checkpoint generation, application version and logs to narrow the problem. Preserve the suspect files while investigating so another save does not overwrite the evidence.
Symptom | First useful check |
Starts from zero | Restart option and input path |
Cannot load state | Format, version and completeness |
Missing components | Generation and file manifest |
Repeated outputs | Replay and commit handling |
Saves grow slower | Capacity and storage contention |
A checksum can help detect changed bytes, but it cannot prove that the application saved a logically correct state. Likewise, a successful load can still expose inconsistent counters or missing inputs later. Use structural checks and a real continuation test together.
If repeated restarts fail at the same point, investigate the original cause as well. A checkpoint may faithfully preserve a problematic state; it does not automatically correct a software bug, invalid input or exhausted resource.
Frequently asked questions
Does Checkpointing save all progress?
It preserves the state represented by the last usable checkpoint. Work performed afterwards may need repeating. A failed or incomplete newest save may require returning to an earlier generation.
Is reconnecting through SSH a checkpoint restore?
No. SSH provides communication with a remote system. Reconnection may let you observe a job that kept running, but restoring a stopped computation requires a separate supported recovery mechanism.
Can I restart on any computer?
Do not assume so. The checkpoint format, program, libraries, hardware and execution configuration can constrain compatibility. Test the intended destination and follow the application's supported procedure.
Should I checkpoint as often as possible?
Frequent saves can cost substantial time and storage traffic. Measure both save overhead and the work exposed between checkpoints, then choose an interval appropriate to the workload and service.
Does a checkpoint replace a backup?
No. It provides a computation restart point. A separate protection strategy may still be needed for checkpoint files, inputs and results if the storage holding them is lost or changed.
Key takeaway
Checkpointing preserves a usable recovery point, not a guarantee of uninterrupted work. Complete state, coherent generations, suitable storage, compatible restart software and tested result checks determine whether it works. Measure the cost of saving and restoring, and verify the whole recovery path before depending on it for a long remote job.

