You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "liupengcheng (JIRA)" <ji...@apache.org> on 2019/03/20 11:29:00 UTC
[jira] [Created] (SPARK-27214) Upgrading locality level when lots
of pending tasks have been waiting more than locality.wait
liupengcheng created SPARK-27214:
------------------------------------
Summary: Upgrading locality level when lots of pending tasks have been waiting more than locality.wait
Key: SPARK-27214
URL: https://issues.apache.org/jira/browse/SPARK-27214
Project: Spark
Issue Type: Improvement
Components: Spark Core
Affects Versions: 2.4.0, 2.1.0
Reporter: liupengcheng
Currently, Spark locality wait mechanism is not friendly for large job, when tasks is large(e.g. 10000+), there are cases when `TaskSetManager.lastLaunchTime` is refreshed due to finished tasks within `spark.locality.wait` but coming at low rate(e.g. every `spark.locality.wait` seconds a task is finished), so locality level would not be upgraded and lots of pending tasks will wait a long time.
In this case, when `spark.dynamicAllocation.enabled=true`, then lots of executors may be removed by Driver due to become idle and finally slow down the job.
Actually, we can optimize this by following formula:
Suppose numPendingTasks=10000, localityExecutionGainFactor=0.1, probabilityOfNextLocalitySchedule=0.5
```
maxStarvingTasks = numPendingTasks * medianOfTaskExecutionTime * localityExecutionGainFactor * probabilityOfNextLocalitySchedule / `spark.locality.wait`
if (numStavingTasks > maxStarvingTasks) {
upgrading locality level...
}
....
```
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org