Skip to main content

What Is Pipeline Durability?

Pipeline durability in Jenkins controls how pipeline state is written to disk so that builds can recover after a crash or restart. Choosing the right durability level helps you balance:
  • Resilience: Ability to resume an in-progress build.
  • Performance: Disk I/O overhead when recording pipeline checkpoints.

Durability Levels

Use MAX_SURVIVABILITY for critical pipelines that must resume after crashes, and PERFORMANCE_OPTIMIZED when speed is more important than resumability.

Configuring Durability Settings

You can override the default durability level at three scopes:
  1. Global (all pipelines)
  2. Branch (multibranch projects)
  3. Per-Pipeline (individual job)

1. Global Configuration

To set the default durability level for every pipeline:
  1. Navigate to Manage Jenkins → Configure System.
  2. Search for “Pipeline Speed/Durability.”
  3. Choose your preferred default level.
The image shows a webpage from the Jenkins documentation, specifically focusing on pipeline speed and durability settings. It includes a navigation menu on the left and detailed instructions on configuring these settings on the right.
In the same screen, use the dropdown to finalize your choice:
The image shows a Jenkins system configuration screen with options for setting pipeline speed and durability levels, including a dropdown menu for selecting the default speed/durability level.

2. Branch-Level (Multibranch Projects)

For multibranch pipelines, you can assign durability per branch:
  1. Go to your project’s Configure page.
  2. Under Repository Sources → Property strategy, choose Named branches.
  3. Add a property for main (or master) with MAX_SURVIVABILITY.
  4. Set PERFORMANCE_OPTIMIZED (or another level) for all other branches.
The image shows a configuration screen for a Jenkins pipeline, with options for setting the script path and selecting a pipeline branch speed/durability level.
The image shows a configuration screen for a Jenkins pipeline, with options for setting the script path and property strategy, and a dropdown menu for selecting build properties.

3. Per-Pipeline Job

To set durability for a single pipeline job:
  1. Open the job and click Configure.
  2. Scroll to Pipeline Speed and Durability.
  3. Select the desired durability level from the dropdown.
The image shows a configuration screen from Jenkins, displaying various pipeline settings and options for a project.

Live Demo

Demo 1: MAX_SURVIVABILITY

This demo writes numbers to a file once per second. With MAX_SURVIVABILITY, the build will resume after a Jenkins restart.
  1. Save and start the build.
  2. On the controller host, kill Jenkins:
  1. After Jenkins restarts, the console shows:
Build execution continues from where it left off.

Demo 2: PERFORMANCE_OPTIMIZED

Switch the same job to PERFORMANCE_OPTIMIZED, rerun, and repeat the kill/restart:
After restart, you’ll see:
Under PERFORMANCE_OPTIMIZED, incomplete builds cannot resume after an unclean shutdown. Plan accordingly if you require resumability.

Conclusion

  • MAX_SURVIVABILITY: Best for mission-critical pipelines that must survive crashes.
  • PERFORMANCE_OPTIMIZED: Ideal when speed is paramount and resumability is not required.
  • SURVIVABLE_NON_ATOMIC: Use as a balanced choice between safety and performance.

Watch Video

Practice Lab