<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://openlakehouse.io/w/index.php?action=history&amp;feed=atom&amp;title=Executor_decommissioning</id>
	<title>Executor decommissioning - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://openlakehouse.io/w/index.php?action=history&amp;feed=atom&amp;title=Executor_decommissioning"/>
	<link rel="alternate" type="text/html" href="https://openlakehouse.io/w/index.php?title=Executor_decommissioning&amp;action=history"/>
	<updated>2026-12-06T00:07:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://openlakehouse.io/w/index.php?title=Executor_decommissioning&amp;diff=146&amp;oldid=prev</id>
		<title>Open Lakehouse Wiki sync: Sync from open-lakehouse/wiki@7c9abaa</title>
		<link rel="alternate" type="text/html" href="https://openlakehouse.io/w/index.php?title=Executor_decommissioning&amp;diff=146&amp;oldid=prev"/>
		<updated>2026-11-25T00:52:41Z</updated>

		<summary type="html">&lt;p&gt;Sync from open-lakehouse/wiki@7c9abaa&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox concept&lt;br /&gt;
| name            = Executor decommissioning&lt;br /&gt;
| also_known_as   = Graceful decommission, node decommissioning, block manager decommissioning&lt;br /&gt;
| field           = Distributed data processing&lt;br /&gt;
| introduced      = Apache Spark 3.1 (SPARK-20624)&lt;br /&gt;
| key_parts       = &amp;lt;code&amp;gt;spark.decommission.enabled&amp;lt;/code&amp;gt;, shuffle and RDD block migration, fallback storage, decommission signal&lt;br /&gt;
| implementations = [[Apache Spark]]&lt;br /&gt;
| related         = [[Executor]], [[Shuffle]], [[Spark on Kubernetes]], [[Spark Kubernetes shuffle storage]], [[Spark Kubernetes pod template]]&lt;br /&gt;
}}&lt;br /&gt;
{{Verified|2026-11-23|the v4.3.0 tag of apache/spark (core/.../internal/config/package.scala and Worker.scala, deploy/k8s/Config.scala, BasicExecutorFeatureStep.scala, decom.sh, YarnAllocator.scala, docs/configuration.md, docs/job-scheduling.md, docs/core-migration-guide.md, docs/spark-standalone.md), SPARK-20624 and its sub-tasks, and the Spark 3.1.1 and 3.4.0 release notes}}&lt;br /&gt;
&lt;br /&gt;
In [[Apache Spark]], &amp;#039;&amp;#039;&amp;#039;executor decommissioning&amp;#039;&amp;#039;&amp;#039; is the graceful shutdown of an [[executor]]: Spark stops sending it new tasks and, when storage decommissioning is on, copies its cached RDD blocks and [[shuffle]] files to other executors or to fallback storage before the executor exits.&amp;lt;ref name=&amp;quot;config&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/configuration.html |title=Spark Configuration (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;jira20628&amp;quot;&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-20628 |title=SPARK-20628: Keep track of nodes which are going to be shut down and avoid scheduling new tasks |publisher=Apache Software Foundation JIRA |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; It lets an application lose executors, for example to dynamic allocation, spot or preemptible nodes or a node drain, without recomputing the data those executors held. Decommissioning is off by default and is controlled by &amp;lt;code&amp;gt;spark.decommission.enabled&amp;lt;/code&amp;gt;.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How does executor decommissioning work? ==&lt;br /&gt;
A decommission starts when the cluster manager or the driver tells an executor to leave. The scheduler then treats the executor as inactive and schedules no new tasks on it.&amp;lt;ref name=&amp;quot;jira20628&amp;quot; /&amp;gt; With &amp;lt;code&amp;gt;spark.storage.decommission.enabled&amp;lt;/code&amp;gt; set, the executor&amp;#039;s block manager migrates its blocks: shuffle files when &amp;lt;code&amp;gt;spark.storage.decommission.shuffleBlocks.enabled&amp;lt;/code&amp;gt; is true and cached RDD blocks when &amp;lt;code&amp;gt;spark.storage.decommission.rddBlocks.enabled&amp;lt;/code&amp;gt; is true.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once its running tasks and all migrations are done, the executor exits on its own; this behaviour came from SPARK-31197 in Spark 3.1.0.&amp;lt;ref&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-31197 |title=SPARK-31197: Exit the executor once all tasks and migrations are finished |publisher=Apache Software Foundation JIRA |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; The driver updates the location of each migrated shuffle block, so reduce tasks fetch it from the new executor.&amp;lt;ref name=&amp;quot;pkg&amp;quot; /&amp;gt; Since Spark 3.4.0, a fetch failure caused by a decommissioned executor does not count toward &amp;lt;code&amp;gt;spark.stage.maxConsecutiveAttempts&amp;lt;/code&amp;gt;, because &amp;lt;code&amp;gt;spark.stage.ignoreDecommissionFetchFailure&amp;lt;/code&amp;gt; defaults to true.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;spark.decommission.enabled&amp;lt;/code&amp;gt; and dynamic allocation both on, Spark decommissions idle executors instead of killing them.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt; Shuffle block migration through decommissioning is one of the documented ways to make dynamic allocation safe without an external shuffle service.&amp;lt;ref name=&amp;quot;jobsched&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/job-scheduling.html |title=Job Scheduling (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which configuration keys control decommissioning? ==&lt;br /&gt;
The main keys are defined in Spark core. Versions are those listed in the Spark 4.3.0 configuration reference and source.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pkg&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/core/src/main/scala/org/apache/spark/internal/config/package.scala |title=package.scala (core config, v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Default !! Since !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.decommission.enabled&amp;lt;/code&amp;gt; || false || 3.1.0 || Turns on graceful decommissioning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.storage.decommission.enabled&amp;lt;/code&amp;gt; || false || 3.1.0 || Decommissions the block manager, so blocks are migrated&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.storage.decommission.shuffleBlocks.enabled&amp;lt;/code&amp;gt; || true || 3.1.0 || Migrates shuffle files; needs a migratable shuffle resolver such as sort-based shuffle&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.storage.decommission.shuffleBlocks.maxThreads&amp;lt;/code&amp;gt; || 8 || 3.1.0 || Threads used to migrate shuffle files&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.storage.decommission.rddBlocks.enabled&amp;lt;/code&amp;gt; || true || 3.1.0 || Migrates cached RDD blocks&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.storage.decommission.fallbackStorage.path&amp;lt;/code&amp;gt; || none || 3.1.0 || Storage path, for example &amp;lt;code&amp;gt;s3a://spark-storage/&amp;lt;/code&amp;gt;, used when no executor can take the blocks; must end with a path separator&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.storage.decommission.fallbackStorage.cleanUp&amp;lt;/code&amp;gt; || false || 3.2.0 || Lets Spark delete its fallback storage data&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.storage.decommission.shuffleBlocks.maxDiskSize&amp;lt;/code&amp;gt; || none || 3.2.0 || Disk space an executor uses for received shuffle blocks before it rejects more&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.executor.decommission.killInterval&amp;lt;/code&amp;gt; || none || 3.1.0 || Expected time until an outside service kills a decommissioned executor; used to decide which of its tasks to speculate&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.executor.decommission.forceKillTimeout&amp;lt;/code&amp;gt; || none || 3.2.0 || Time after which Spark forces a decommissioning executor to exit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.executor.decommission.signal&amp;lt;/code&amp;gt; || PWR || 3.2.0 || Signal that starts decommissioning in the executor&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The block-migration defaults changed in Spark 3.4. Since then, Spark migrates both cached RDD blocks and shuffle blocks once &amp;lt;code&amp;gt;spark.decommission.enabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;spark.storage.decommission.enabled&amp;lt;/code&amp;gt; are true; setting the &amp;lt;code&amp;gt;rddBlocks&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;shuffleBlocks&amp;lt;/code&amp;gt; keys to false restores the earlier behaviour.&amp;lt;ref name=&amp;quot;migration&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/core-migration-guide.html |title=Migration Guide: Spark Core (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fallback storage is not cleaned up unless &amp;lt;code&amp;gt;spark.storage.decommission.fallbackStorage.cleanUp&amp;lt;/code&amp;gt; is true, and the Spark documentation recommends managing the path with a time-to-live policy.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;pkg&amp;quot; /&amp;gt; A low &amp;lt;code&amp;gt;forceKillTimeout&amp;lt;/code&amp;gt; can stop migrations before they finish, so the documentation advises a high value.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which cluster managers trigger executor decommissioning? ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Kubernetes.&amp;#039;&amp;#039;&amp;#039; When &amp;lt;code&amp;gt;spark.decommission.enabled&amp;lt;/code&amp;gt; is true, Spark adds a &amp;lt;code&amp;gt;preStop&amp;lt;/code&amp;gt; lifecycle hook to the executor container that runs &amp;lt;code&amp;gt;spark.kubernetes.decommission.script&amp;lt;/code&amp;gt; (default &amp;lt;code&amp;gt;/opt/decom.sh&amp;lt;/code&amp;gt;, since Spark 3.2.0).&amp;lt;ref name=&amp;quot;k8sfeature&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/BasicExecutorFeatureStep.scala |title=BasicExecutorFeatureStep.scala (v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;k8sconfig&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala |title=Config.scala (Kubernetes resource manager, v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; The script in the Spark image sends &amp;lt;code&amp;gt;SIGPWR&amp;lt;/code&amp;gt; to the executor JVM and waits for it to exit, so deleting or evicting the pod starts a graceful decommission.&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/resource-managers/kubernetes/docker/src/main/dockerfiles/spark/decom.sh |title=decom.sh (v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; Since Spark 3.3.0, &amp;lt;code&amp;gt;spark.kubernetes.executor.decommissionLabel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;decommissionLabelValue&amp;lt;/code&amp;gt; label pods that are being decommissioned, for use with pod disruption budgets and pod deletion cost.&amp;lt;ref name=&amp;quot;k8s&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/running-on-kubernetes.html |title=Running Spark on Kubernetes (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; Shuffle storage options that complement decommissioning on Kubernetes are described in [[Spark Kubernetes shuffle storage]].&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Standalone.&amp;#039;&amp;#039;&amp;#039; With decommissioning enabled, a standalone worker registers a handler for &amp;lt;code&amp;gt;spark.worker.decommission.signal&amp;lt;/code&amp;gt; (default &amp;lt;code&amp;gt;PWR&amp;lt;/code&amp;gt;, since 3.2.0) and decommissions itself and its executors when it receives the signal.&amp;lt;ref name=&amp;quot;worker&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala |title=Worker.scala (v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/core/src/main/scala/org/apache/spark/internal/config/Worker.scala |title=Worker.scala (core config, v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; The Master web UI also has a &amp;lt;code&amp;gt;/workers/kill&amp;lt;/code&amp;gt; endpoint for decommissioning workers; &amp;lt;code&amp;gt;spark.master.ui.decommission.allow.mode&amp;lt;/code&amp;gt; (default &amp;lt;code&amp;gt;LOCAL&amp;lt;/code&amp;gt;, since 3.1.0) controls which hosts may call it.&amp;lt;ref&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/spark-standalone.html |title=Spark Standalone Mode (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;YARN.&amp;#039;&amp;#039;&amp;#039; Since Spark 3.4.0, the YARN allocator watches for NodeManagers in the &amp;lt;code&amp;gt;DECOMMISSIONING&amp;lt;/code&amp;gt; state and asks the driver to decommission the executors on those hosts.&amp;lt;ref name=&amp;quot;yarn&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala |title=YarnAllocator.scala (v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;rel340&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/releases/spark-release-3-4-0.html |title=Spark Release 3.4.0 |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; This works only when the external shuffle service is disabled; with &amp;lt;code&amp;gt;spark.shuffle.service.enabled&amp;lt;/code&amp;gt; true, Spark logs a warning and skips YARN executor decommissioning (SPARK-39018).&amp;lt;ref name=&amp;quot;yarn&amp;quot; /&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-39018 |title=SPARK-39018: Add support for YARN decommissioning when ESS is Disabled |publisher=Apache Software Foundation JIRA |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Decommissioning on Kubernetes with shuffle migration and an object-storage fallback:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
spark.decommission.enabled                          true&lt;br /&gt;
spark.storage.decommission.enabled                  true&lt;br /&gt;
spark.storage.decommission.shuffleBlocks.enabled    true&lt;br /&gt;
spark.storage.decommission.rddBlocks.enabled        true&lt;br /&gt;
spark.storage.decommission.fallbackStorage.path     s3a://spark-storage/&lt;br /&gt;
spark.dynamicAllocation.enabled                     true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is the history of executor decommissioning? ==&lt;br /&gt;
Holden Karau opened SPARK-20624, &amp;quot;SPIP: Add better handling for node shutdown&amp;quot;, in May 2017. It proposed handling preemption that Spark does not choose, such as YARN over-commit and cloud spot or preemptible instances, by moving data off the node or at least not scheduling new tasks there.&amp;lt;ref name=&amp;quot;jira20624&amp;quot;&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-20624 |title=SPARK-20624: SPIP: Add better handling for node shutdown |publisher=Apache Software Foundation JIRA |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; The umbrella ticket is still marked In Progress, with some sub-tasks open.&amp;lt;ref name=&amp;quot;jira20624&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core sub-tasks shipped in the Spark 3.1 line: avoiding new tasks on decommissioning nodes (SPARK-20628), shuffle block migration (SPARK-20629), cached block migration (SPARK-20732), decommissioning as part of dynamic scaling (SPARK-31198) and fallback storage (SPARK-33545).&amp;lt;ref name=&amp;quot;jira20628&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;rel311&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/releases/spark-release-3-1-1.html |title=Spark Release 3.1.1 |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; The Spark 3.1.1 release notes, published on 2 March 2021, list it as experimental node decommissioning for Kubernetes and standalone.&amp;lt;ref name=&amp;quot;rel311&amp;quot; /&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |url=https://spark.apache.org/news/index.html |title=News |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Spark 3.4.0 added YARN support (SPARK-30835), stopped rerunning tasks whose shuffle data had already migrated (SPARK-41469) and ignored fetch failures caused by decommissioned executors (SPARK-40481).&amp;lt;ref name=&amp;quot;rel340&amp;quot; /&amp;gt; Spark 4.3.0 added &amp;lt;code&amp;gt;spark.storage.decommission.shuffleBlocks.bufferRacingMigrations&amp;lt;/code&amp;gt; (default true), which keeps a migration report that reaches the driver before the map output is registered and applies it once registration happens.&amp;lt;ref name=&amp;quot;pkg&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Executor]]&lt;br /&gt;
* [[Shuffle]]&lt;br /&gt;
* [[Spark Kubernetes shuffle storage]]&lt;br /&gt;
* [[Spark Kubernetes pod template]]&lt;br /&gt;
* [[Spark on Kubernetes]]&lt;br /&gt;
* [[Kubernetes Operator for Apache Spark]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Navbox open lakehouse}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Concepts]]&lt;br /&gt;
[[Category:Glossary terms]]&lt;br /&gt;
[[Category:Apache Spark]]&lt;/div&gt;</summary>
		<author><name>Open Lakehouse Wiki sync</name></author>
	</entry>
</feed>