GitHub user jinxing64 opened a pull request:
https://github.com/apache/spark/pull/17533
[SPARK-20219] Schedule tasks based on size of input from ScheduledRDD
## What changes were proposed in this pull request?
When data is highly skewed on `ShuffledRDD`, it make sense to launch those
tasks which process much more input as soon as possible. The current scheduling
mechanism in `TaskSetManager` is quite simple:
```
for (i <- (0 until numTasks).reverse) {
addPendingTask(i)
}
```
In scenario that "large tasks" locate at bottom half of tasks array, if
tasks with much more input are launched early, we can significantly reduce the
time cost and save resource when "dynamic allocation" is disabled.
## How was this patch tested?
Added unit test in 'TaskSetManagerSuite'.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jinxing64/spark SPARK-20219
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/17533.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #17533
----
commit bca146c531060f32fa351397e13f0f778fe35b25
Author: jinxing <[email protected]>
Date: 2017-04-04T15:25:19Z
Sort tasks based on their size.
commit f757e4125935f7237a29bb07313ffb46ccbb3cd0
Author: jinxing <[email protected]>
Date: 2017-04-05T03:06:41Z
Add unit test.
----
---
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]