Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2215,13 +2215,13 @@ package object config {
ConfigBuilder("spark.speculation.multiplier")
.version("0.6.0")
.doubleConf
.createWithDefault(1.5)
.createWithDefault(3)

private[spark] val SPECULATION_QUANTILE =
ConfigBuilder("spark.speculation.quantile")
.version("0.6.0")
.doubleConf
.createWithDefault(0.75)
.createWithDefault(0.9)

private[spark] val SPECULATION_MIN_THRESHOLD =
ConfigBuilder("spark.speculation.minTaskRuntime")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2013,6 +2013,7 @@ class TaskSetManagerSuite
val conf = new SparkConf()
conf.set(config.SPECULATION_ENABLED, true)
conf.set(config.SPECULATION_QUANTILE.key, speculationQuantile.toString)
conf.set(config.SPECULATION_MULTIPLIER.key, "1.5")
// Set the number of slots per executor
conf.set(config.EXECUTOR_CORES.key, numExecutorCores.toString)
conf.set(config.CPUS_PER_TASK.key, numCoresPerTask.toString)
Expand Down Expand Up @@ -2414,6 +2415,7 @@ class TaskSetManagerSuite
// minTimeToSpeculation parameter to checkSpeculatableTasks
val conf = new SparkConf()
.set(config.SPECULATION_MULTIPLIER, 0.0)
.set(config.SPECULATION_QUANTILE, 0.75)
.set(config.SPECULATION_ENABLED, true)
sc = new SparkContext("local", "test", conf)
val ser = sc.env.closureSerializer.newInstance()
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2907,15 +2907,15 @@ Apart from these, the following properties are also available, and may be useful
</tr>
<tr>
<td><code>spark.speculation.multiplier</code></td>
<td>1.5</td>
<td>3</td>
<td>
How many times slower a task is than the median to be considered for speculation.
</td>
<td>0.6.0</td>
</tr>
<tr>
<td><code>spark.speculation.quantile</code></td>
<td>0.75</td>
<td>0.9</td>
<td>
Fraction of tasks which must be complete before speculation is enabled for a particular stage.
</td>
Expand Down
2 changes: 2 additions & 0 deletions docs/core-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ license: |

- Since Spark 4.0, the default log4j output has shifted from plain text to JSON lines to enhance analyzability. To revert to plain text output, you can either set `spark.log.structuredLogging.enabled` to `false`, or use a custom log4j configuration.

- Since Spark 4.0, Spark performs speculative executions less agressively with `spark.speculation.multiplier=3` and `spark.speculation.quantile=0.9`. To restore the legacy behavior, you can set `spark.speculation.multiplier=1.5` and `spark.speculation.quantile=0.75`.

## Upgrading from Core 3.4 to 3.5

- Since Spark 3.5, `spark.yarn.executor.failuresValidityInterval` is deprecated. Use `spark.executor.failuresValidityInterval` instead.
Expand Down