Skip to main content
Pipeline durability controls how often Jenkins persists runtime state to disk for Pipeline jobs. The setting is a trade-off between survivability (ability to resume a paused build after an unclean Jenkins shutdown) and performance (disk I/O and throughput). For large or long-running Pipelines you may tune durability to match your reliability and performance needs.

Durability modes

The three durability options are:
  • PERFORMANCE_OPTIMIZED — minimizes disk I/O to maximize throughput. Builds with this setting behave like Freestyle jobs after an unclean shutdown and may not be resumable.
  • MAX_SURVIVABILITY — writes runtime state frequently to disk to give the best chance of resuming after an unclean shutdown. This is the slowest option; use it for critical deployments or infrastructure tasks.
  • SURVIVABLE_NON_ATOMIC — a compromise: better survivability than PERFORMANCE_OPTIMIZED with less disk I/O than MAX_SURVIVABILITY, but without full atomic guarantees.
A screenshot of the Jenkins documentation page titled "What Are The Durability Settings?" showing a left-hand user handbook navigation and main content describing durability modes, best practices, and scaling suggestions for pipelines.
Default durability is MAX_SURVIVABILITY. Choose PERFORMANCE_OPTIMIZED only when you need higher throughput and can tolerate losing the ability to resume builds after an unclean shutdown.

Quick comparison

Durability OptionTrade-offBest use case
MAX_SURVIVABILITYHighest disk I/O, best resumabilityProduction-critical pipelines or infrastructure changes
SURVIVABLE_NON_ATOMICMedium disk I/O, partial resumabilityLong-running pipelines where some resiliency is desired
PERFORMANCE_OPTIMIZEDLowest disk I/O, may not resume after crashHigh-throughput pipelines where resumability is not required

Where to configure durability

You can change durability at several scopes depending on whether you want a cluster-wide policy or per-job behavior.
ScopeHow to setNotes
Global (default)Manage Jenkins → Configure System → Pipeline Speed / DurabilitySets cluster-wide default for new jobs
Job (Pipeline)Job configuration → Pipeline options / DurabilityOverrides global default for that job
Multi-branch / branch-levelRepository sources → Property strategy → branch exceptionsAssign different durability per branch (e.g., main = MAX_SURVIVABILITY, feature branches = PERFORMANCE_OPTIMIZED)
To update the cluster-wide default, go to Manage Jenkins → Configure System and change the “Pipeline Speed / Durability” dropdown.
A screenshot of a Jenkins "Manage Jenkins > System" settings page in dark mode, showing the "Pipeline Speed / Durability" section with a dropdown of durability options (e.g., "Maximum survivability/durability but slowest"). The page also shows access key controls and Save/Apply buttons.

Branch-level settings in Multi-branch projects

For GitHub Organization or Multibranch Pipeline jobs, use the repository source’s property strategy to add exceptions per branch. This allows, for example, main/master to use MAX_SURVIVABILITY while feature branches run with PERFORMANCE_OPTIMIZED for speed.
A screenshot of the Jenkins "New Item" page, showing an input field for entering an item name and a list of job types such as Pipeline, Multi-configuration project, and Folder. The browser UI and Jenkins header are also visible.

Pipeline-level configuration and demonstration

You can set durability for an individual Pipeline job. The example below demonstrates how MAX_SURVIVABILITY preserves runtime state so a pipeline resumes after an unclean controller restart, whereas PERFORMANCE_OPTIMIZED may not. Create a simple Pipeline job and set its durability to MAX_SURVIVABILITY. Use this Jenkinsfile — it writes one line per second into numbers.txt for 60 iterations:
pipeline {
    agent any
    stages {
        stage('For Loop - Durability Test') {
            steps {
                script {
                    sh 'touch numbers.txt'
                    for (int i = 0; i < 60; i++) {
                        sh "echo ${i + 1} >> numbers.txt"
                        sleep 1
                    }
                }
            }
        }
    }
}
Start the job; it appends numbers 1..60 to numbers.txt once per second.
A dark-themed Jenkins pipeline dashboard for a job named "durability-test," showing a small pipeline stage diagram, permalinks, and a build history panel. The left sidebar contains job actions like Configure, Build Now, and Pipeline Syntax.

Demonstration — MAX_SURVIVABILITY

  1. Configure the job to use MAX_SURVIVABILITY and start the pipeline.
  2. On the Jenkins controller, simulate an unclean shutdown by killing the Jenkins process:
# Find the Jenkins process
ps aux | grep -i jenkins.war

# Example output (abbreviated)
# Kill the process (replace <PID> with the actual PID)
kill -9 1048864

# Check service status
systemctl status jenkins
  1. Restart Jenkins and open the build console. With MAX_SURVIVABILITY the Pipeline should resume from where it left off. Example console excerpt showing resumption:
[Pipeline] sh
+ echo 39
[Pipeline] sleep
Sleeping for 1 sec
Resuming build at Sun Nov 10 17:22:47 UTC 2024 after Jenkins restart
No need to sleep any longer
Ready to run at Sun Nov 10 17:22:48 UTC 2024
[Pipeline] sh
+ echo 40
MAX_SURVIVABILITY persists sufficient runtime state to disk, enabling resumption.

Switching to PERFORMANCE_OPTIMIZED

Repeat the test after changing the job’s durability to PERFORMANCE_OPTIMIZED. Start the pipeline and simulate an unclean shutdown as before.
# Find and kill the new Jenkins process
ps aux | grep -i jenkins.war
kill -9 1052015
systemctl status jenkins
With PERFORMANCE_OPTIMIZED, the pipeline minimizes disk writes; an unclean shutdown can break resumability. Example pipeline output after restart:
[Pipeline] sh
+ echo 15
[Pipeline] sleep
Sleeping for 1 sec
[Pipeline] sh
+ echo 16
[Pipeline] sleep
Sleeping for 1 sec
[Pipeline] sh
Creating placeholder flownodes because failed loading originals.
ERROR: Cannot resume build because FlowNode 42 for FlowHead 1 could not be loaded. This is expected to happen when using the PERFORMANCE_OPTIMIZED durability setting and Jenkins is not shut down cleanly. Consider investigating to understand if Jenkins was not shut down cleanly or switching to the MAX_SURVIVABILITY durability setting which should prevent this issue in most cases.
Finished: FAILURE
Because PERFORMANCE_OPTIMIZED reduces write frequency, required FlowNode data may be missing after an unclean shutdown and the build will not resume.
Using PERFORMANCE_OPTIMIZED reduces disk I/O and improves pipeline throughput, but it increases the risk that builds cannot be resumed after an unclean shutdown. Use it only when resumability is not required.

Summary

  • MAX_SURVIVABILITY: safest option; highest disk I/O; use for production-critical or infrastructure pipelines.
  • SURVIVABLE_NON_ATOMIC: intermediate choice; reasonable resiliency with lower I/O than MAX_SURVIVABILITY.
  • PERFORMANCE_OPTIMIZED: best throughput; lowest I/O; may lose resumability after unclean shutdowns.
Choose the scope and mode that best fit your reliability, performance, and operational constraints — globally, per-pipeline, or per-branch in multi-branch jobs.