Github user mridulm commented on a diff in the pull request:
https://github.com/apache/spark/pull/16867#discussion_r103516283
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala ---
@@ -911,14 +916,14 @@ private[spark] class TaskSetManager(
logDebug("Checking for speculative tasks: minFinished = " +
minFinishedForSpeculation)
if (tasksSuccessful >= minFinishedForSpeculation && tasksSuccessful >
0) {
val time = clock.getTimeMillis()
- val durations =
taskInfos.values.filter(_.successful).map(_.duration).toArray
- Arrays.sort(durations)
+ val durations = successfulTasksSet.toArray.map(taskInfos(_).duration)
val medianDuration = durations(min((0.5 *
tasksSuccessful).round.toInt, durations.length - 1))
val threshold = max(SPECULATION_MULTIPLIER * medianDuration,
minTimeToSpeculation)
// TODO: Threshold should also look at standard deviation of task
durations and have a lower
// bound based on that.
logDebug("Task length threshold for speculation: " + threshold)
- for ((tid, info) <- taskInfos) {
+ for (tid <- runningTasksSet) {
+ val info = taskInfos(tid)
--- End diff --
@squito @kayousterhout @jinxing64 Just to add, the other change does look
interesting - and I can definitely see potential value in it. Would be good to
see actual impact of it.
For example, when I was running jobs with 200k - 400k tasks, this never
came up (though probably my config's were different from yours) - would be good
to see actual impact of the other changes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]