<?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=Push-based_shuffle</id>
	<title>Push-based shuffle - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://openlakehouse.io/w/index.php?action=history&amp;feed=atom&amp;title=Push-based_shuffle"/>
	<link rel="alternate" type="text/html" href="https://openlakehouse.io/w/index.php?title=Push-based_shuffle&amp;action=history"/>
	<updated>2026-12-06T00:13:30Z</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=Push-based_shuffle&amp;diff=167&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=Push-based_shuffle&amp;diff=167&amp;oldid=prev"/>
		<updated>2026-11-25T00:52:47Z</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            = Push-based shuffle&lt;br /&gt;
| also_known_as   = Push-based shuffle merge, &amp;lt;code&amp;gt;spark.shuffle.push&amp;lt;/code&amp;gt;&lt;br /&gt;
| field           = Distributed data processing&lt;br /&gt;
| introduced      = Apache Spark 3.2.0 (SPARK-30602)&lt;br /&gt;
| key_parts       = Block pushing from map tasks, merger locations on external shuffle services, merged shuffle partitions, merge finalization&lt;br /&gt;
| implementations = [[Apache Spark]] on YARN with the [[external shuffle service]]&lt;br /&gt;
| related         = [[Shuffle]], [[External shuffle service]], [[Dynamic allocation]]&lt;br /&gt;
}}&lt;br /&gt;
{{Verified|2026-11-23|the v4.3.0 tag of apache/spark (docs/configuration.md, push-based shuffle section and spark.shuffle.push.* settings) and SPARK-30602}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Push-based shuffle&amp;#039;&amp;#039;&amp;#039; is an [[Apache Spark]] [[shuffle]] mode in which map tasks push their shuffle blocks to remote [[external shuffle service]]s, which merge the blocks for each shuffle partition, so that reduce tasks can read a few large merged files instead of many small blocks. It was added in Spark 3.2.0 through the SPIP in SPARK-30602.&amp;lt;ref name=&amp;quot;spark30602&amp;quot;&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-30602 |title=SPARK-30602: SPIP: Support push-based shuffle to improve shuffle efficiency |publisher=Apache Software Foundation JIRA |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; It is off by default and, in Spark 4.3.0, supported only for Spark on YARN with the external shuffle service.&amp;lt;ref name=&amp;quot;config&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/docs/4.3.0/configuration.html#push-based-shuffle-overview |title=Spark Configuration: Push-based shuffle overview (Spark 4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-23}}&amp;lt;/ref&amp;gt; The Spark 4.3.0 documentation describes it without a deprecated or experimental label.&lt;br /&gt;
&lt;br /&gt;
== What problem does push-based shuffle solve? ==&lt;br /&gt;
In a regular Spark shuffle, every reduce task fetches one block from every map task&amp;#039;s output. The number of blocks therefore grows with the number of map tasks times the number of reduce tasks, and each block can be small. The SPIP describes large Spark-on-YARN deployments where the external shuffle service stores shuffle files on hard disks, and where these many small, random reads make the shuffle a scaling bottleneck and a source of inefficiency.&amp;lt;ref name=&amp;quot;spark30602&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What does push-based shuffle change? ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Map side.&amp;#039;&amp;#039;&amp;#039; After a map task writes its shuffle output as usual, Spark pushes the blocks, on a best-effort basis, to a set of external shuffle services chosen as &amp;#039;&amp;#039;&amp;#039;merger locations&amp;#039;&amp;#039;&amp;#039; for the shuffle.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Merge.&amp;#039;&amp;#039;&amp;#039; Each merger appends the pushed blocks for a partition into one merged shuffle file. After all map tasks are done, the driver waits &amp;lt;code&amp;gt;spark.shuffle.push.finalize.timeout&amp;lt;/code&amp;gt; (default 10s) and then asks the mergers to finalize the merge.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Reduce side.&amp;#039;&amp;#039;&amp;#039; Reduce tasks read a combination of merged shuffle partitions and original shuffle blocks. Blocks that were not pushed or not merged are still fetched the normal way, which is why the push can be best effort.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result, according to the Spark docs, is that small random disk reads by the external shuffle services become large sequential reads, and that reduce tasks may also get better data locality, which reduces network I/O.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt; The docs describe the goal as improving both the reliability and the performance of the shuffle.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Which cluster managers support push-based shuffle? ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cluster manager !! Push-based shuffle&lt;br /&gt;
|-&lt;br /&gt;
| YARN, with the external shuffle service&lt;br /&gt;
| Supported&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Standalone&lt;br /&gt;
| Not supported&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Kubernetes&lt;br /&gt;
| Not supported; Spark on Kubernetes has no external shuffle service&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&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;
&lt;br /&gt;
The Spark docs state that push-based shuffle helps long-running jobs and queries with large disk I/O during shuffle, and is currently not well suited to jobs that run quickly on a small amount of shuffle data.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to enable push-based shuffle ==&lt;br /&gt;
Push-based shuffle needs a setting on both sides. On the server side, the external shuffle service in each NodeManager must use the merging implementation; on the client side, the application turns pushing on.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# External shuffle service (server side), for example in the YARN shuffle service configuration&lt;br /&gt;
spark.shuffle.push.server.mergedShuffleFileManagerImpl  org.apache.spark.network.shuffle.RemoteBlockPushResolver&lt;br /&gt;
&lt;br /&gt;
# Application (client side)&lt;br /&gt;
spark.shuffle.service.enabled   true&lt;br /&gt;
spark.shuffle.push.enabled      true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The server-side default, &amp;lt;code&amp;gt;NoOpMergedShuffleFileManager&amp;lt;/code&amp;gt;, disables push-based shuffle.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Main settings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Setting !! Default !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.shuffle.push.enabled&amp;lt;/code&amp;gt; || false || Turn on pushing on the client side&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.shuffle.push.finalize.timeout&amp;lt;/code&amp;gt; || 10s || Time the driver waits after all map tasks finish before finalizing the merge&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.shuffle.push.maxBlockSizeToPush&amp;lt;/code&amp;gt; || 1m || Larger blocks are not pushed and are fetched the normal way&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.shuffle.push.maxBlockBatchSize&amp;lt;/code&amp;gt; || 3m || Maximum size of a batch of blocks in one push request&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.shuffle.push.minShuffleSizeToWait&amp;lt;/code&amp;gt; || 500m || Below this total shuffle size, the driver finalizes at once without waiting&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.shuffle.push.minCompletedPushRatio&amp;lt;/code&amp;gt; || 1.0 || Fraction of map partitions that must finish pushing before finalization starts&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.shuffle.push.mergersMinStaticThreshold&amp;lt;/code&amp;gt; || 5 || Minimum number of merger locations needed to use push-based shuffle for a stage&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spark.shuffle.push.mergersMinThresholdRatio&amp;lt;/code&amp;gt; || 0.05 || Minimum merger locations as a ratio of the reduce stage&amp;#039;s partitions; the larger of the two minimums applies&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;small&amp;gt;Source: Spark 4.3.0 configuration reference.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a stage cannot get enough merger locations, it does not use push-based shuffle. For example, a reduce stage with 100 partitions needs at least 5 merger locations with the default ratio.&amp;lt;ref name=&amp;quot;config&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Shuffle]]&lt;br /&gt;
* [[External shuffle service]]&lt;br /&gt;
* [[Dynamic allocation]]&lt;br /&gt;
* [[Executor]]&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>