# Speculative execution

Glossary, read 10 Nov 2026

**The short answer.** Speculative execution relaunches a slow task on another executor and keeps whichever copy finishes first. It is off by default (spark.speculation=false). When on, a task is a candidate if it is 3 times slower than the median and 90% of the stage's tasks are done.

Speculation helps when one node is slow, and does nothing for skew, since a duplicate of an oversized task is still oversized. It also spends extra cores, which matters when you pay per vCPU-hour.

Check whether a benchmark baseline had it on. It changes elapsed time and cost without changing the job.

## A sourced example

The Spark defaults are spark.speculation.multiplier=3, spark.speculation.quantile=0.9 and spark.speculation.minTaskRuntime=100ms, with a check interval of 100ms.

## Sources

- Apache Spark configuration reference: speculation: https://spark.apache.org/docs/latest/configuration.html (read 10 Nov 2026)

Last reviewed 10 Nov 2026. Canonical: https://sparkaccelerationcompare.com/glossary/speculative-execution/
