Uh oh!
There was an error while loading. Please reload this page.
[SPARK-14269][SCHEDULER] Eliminate unnecessary submitStage() call. - #12060
[SPARK-14269][SCHEDULER] Eliminate unnecessary submitStage() call.#12060ueshin wants to merge 19 commits into
Conversation
…cal order to ensure building ancestor stages first.
This reverts commit 1636531.
ueshin
commented
Mar 30, 2016
This PR is based on #11720, so please check it first. |
SparkQA
commented
Mar 30, 2016
Test build #54509 has finished for PR 12060 at commit
|
maropu
commented
Mar 30, 2016
Seems that this optimization must need correct stage graphs fixed in #11720, is this correct? |
ueshin
commented
Mar 30, 2016
Yes, that's right. |
maropu
commented
Mar 30, 2016
| } | ||
| // Note: newly runnable stages will be submitted below when we submit waiting stages | ||
| submitWaitingChildStages(shuffleStage) |
There was a problem hiding this comment.
Should this be done when !shuffleStage.isAvailable and we have resubmitted the shuffleStage, or only within the else branch?
There was a problem hiding this comment.
@markhamstra Thank you for your review.
Definitely we can move this into else branch.
I'll modify it.
…ge becomes available.
ueshin
commented
Mar 31, 2016
SparkQA
commented
Mar 31, 2016
Test build #54582 has finished for PR 12060 at commit
|
ueshin
commented
Mar 31, 2016
Jenkins, retest this please. |
SparkQA
commented
Mar 31, 2016
Test build #54595 has finished for PR 12060 at commit
|
| val childStages = waitingStages.filter(_.parents.contains(parent)).toArray | ||
| waitingStages --= childStages | ||
| for (stage <- childStages.sortBy(_.firstJobId)) { | ||
| submitStage(stage) |
There was a problem hiding this comment.
Seems submitWaitingChildStages is called to submit child stages when the given parent stage is available. From this observation, do we have to re-check missing parents inside submitStage?
There was a problem hiding this comment.
Yes, and the re-check is done in the submitStage().
If there are some missing parent stages, the child will go to waitingStages again.
maropu
commented
Apr 1, 2016
This pr seems great in terms of spark-core performance, so could you assign qualified guys to review this? cc: @rxin |
SparkQA
commented
May 13, 2016
Test build #58529 has finished for PR 12060 at commit
|
zzcclp
commented
May 13, 2016
Good PR, will it plan to be merged into branch-1.6? |
markhamstra
commented
May 13, 2016
@zzcclp Not likely. This PR shouldn't produce any different results, but rather produces the same results faster. We're typically very conservative with patch-level releases, so the optimization work for this PR will almost certainly only appear in the Spark 2.x series. That's not too far off. |
zzcclp
commented
May 13, 2016
@markhamstra , thanks for your explaintion. |
| @@ -1357,7 +1345,6 @@ class DAGScheduler( | |||
| logDebug("Additional executor lost message for " + execId + | |||
| "(epoch " + currentEpoch + ")") | |||
| } | |||
There was a problem hiding this comment.
Is it necessary to submit some newly-waiting stages here (e.g., if shuffle output was lost for a map stage, so now that map stage needs to be re-run)?
There was a problem hiding this comment.
This appears to be a non-issue, because we handle lost shuffle output separately, when we get a FetchFailure from a task that tries to fetch the output.
kayousterhout
commented
May 16, 2016
This LGTM with the small comment changes I suggested. @markhamstra any objections to this? Mark / @rxin thoughts on merging it into the 2.0 branch? |
ueshin
commented
May 17, 2016
@kayousterhout Thank you for your review. |
SparkQA
commented
May 17, 2016
Test build #58659 has finished for PR 12060 at commit
|
SparkQA
commented
May 23, 2016
Test build #59133 has finished for PR 12060 at commit
|
ueshin
commented
May 23, 2016
Jenkins, retest this please. |
SparkQA
commented
May 23, 2016
Test build #59153 has finished for PR 12060 at commit
|
kayousterhout
commented
May 25, 2016
I merged this into master (not 2.0, since it's a performance problem rather than a correctness problem, and this isn't a regression). Thanks @ueshin! |
ueshin
commented
May 25, 2016
Thanks a lot for merging this! |
Currently a method `submitStage()` for waiting stages is called on every iteration of the event loop in `DAGScheduler` to submit all waiting stages, but most of them are not necessary because they are not related to Stage status. The case we should try to submit waiting stages is only when their parent stages are successfully completed. This elimination can improve `DAGScheduler` performance. Added some checks and other existing tests, and our projects. We have a project bottle-necked by `DAGScheduler`, having about 2000 stages. Before this patch the almost all execution time in `Driver` process was spent to process `submitStage()` of `dag-scheduler-event-loop` thread but after this patch the performance was improved as follows: | | total execution time | `dag-scheduler-event-loop` thread time | `submitStage()` | |--------|---------------------:|---------------------------------------:|----------------:| | Before | 760 sec | 710 sec | 667 sec | | After | 440 sec | 14 sec | 10 sec | Author: Takuya UESHIN <ueshin@happy-camper.st> Closesapache#12060 from ueshin/issues/SPARK-14269.
Currently a method `submitStage()` for waiting stages is called on every iteration of the event loop in `DAGScheduler` to submit all waiting stages, but most of them are not necessary because they are not related to Stage status. The case we should try to submit waiting stages is only when their parent stages are successfully completed. This elimination can improve `DAGScheduler` performance. Added some checks and other existing tests, and our projects. We have a project bottle-necked by `DAGScheduler`, having about 2000 stages. Before this patch the almost all execution time in `Driver` process was spent to process `submitStage()` of `dag-scheduler-event-loop` thread but after this patch the performance was improved as follows: | | total execution time | `dag-scheduler-event-loop` thread time | `submitStage()` | |--------|---------------------:|---------------------------------------:|----------------:| | Before | 760 sec | 710 sec | 667 sec | | After | 440 sec | 14 sec | 10 sec | Author: Takuya UESHIN <ueshin@happy-camper.st> Closesapache#12060 from ueshin/issues/SPARK-14269.
## What changes were proposed in this pull request? Currently a method `submitStage()` for waiting stages is called on every iteration of the event loop in `DAGScheduler` to submit all waiting stages, but most of them are not necessary because they are not related to Stage status. The case we should try to submit waiting stages is only when their parent stages are successfully completed. This elimination can improve `DAGScheduler` performance. ## How was this patch tested? Added some checks and other existing tests, and our projects. We have a project bottle-necked by `DAGScheduler`, having about 2000 stages. Before this patch the almost all execution time in `Driver` process was spent to process `submitStage()` of `dag-scheduler-event-loop` thread but after this patch the performance was improved as follows: | | total execution time | `dag-scheduler-event-loop` thread time | `submitStage()` | |--------|---------------------:|---------------------------------------:|----------------:| | Before | 760 sec | 710 sec | 667 sec | | After | 440 sec | 14 sec | 10 sec | Author: Takuya UESHIN <ueshin@happy-camper.st> Closesapache#12060 from ueshin/issues/SPARK-14269.
## What changes were proposed in this pull request? Currently a method `submitStage()` for waiting stages is called on every iteration of the event loop in `DAGScheduler` to submit all waiting stages, but most of them are not necessary because they are not related to Stage status. The case we should try to submit waiting stages is only when their parent stages are successfully completed. This elimination can improve `DAGScheduler` performance. ## How was this patch tested? Added some checks and other existing tests, and our projects. We have a project bottle-necked by `DAGScheduler`, having about 2000 stages. Before this patch the almost all execution time in `Driver` process was spent to process `submitStage()` of `dag-scheduler-event-loop` thread but after this patch the performance was improved as follows: | | total execution time | `dag-scheduler-event-loop` thread time | `submitStage()` | |--------|---------------------:|---------------------------------------:|----------------:| | Before | 760 sec | 710 sec | 667 sec | | After | 440 sec | 14 sec | 10 sec | Author: Takuya UESHIN <ueshin@happy-camper.st> Closesapache#12060 from ueshin/issues/SPARK-14269.
## What changes were proposed in this pull request? Currently a method `submitStage()` for waiting stages is called on every iteration of the event loop in `DAGScheduler` to submit all waiting stages, but most of them are not necessary because they are not related to Stage status. The case we should try to submit waiting stages is only when their parent stages are successfully completed. This elimination can improve `DAGScheduler` performance. ## How was this patch tested? Added some checks and other existing tests, and our projects. We have a project bottle-necked by `DAGScheduler`, having about 2000 stages. Before this patch the almost all execution time in `Driver` process was spent to process `submitStage()` of `dag-scheduler-event-loop` thread but after this patch the performance was improved as follows: | | total execution time | `dag-scheduler-event-loop` thread time | `submitStage()` | |--------|---------------------:|---------------------------------------:|----------------:| | Before | 760 sec | 710 sec | 667 sec | | After | 440 sec | 14 sec | 10 sec | Author: Takuya UESHIN <ueshin@happy-camper.st> Closesapache#12060 from ueshin/issues/SPARK-14269.
What changes were proposed in this pull request?
Currently a method
submitStage()for waiting stages is called on every iteration of the event loop inDAGSchedulerto submit all waiting stages, but most of them are not necessary because they are not related to Stage status.The case we should try to submit waiting stages is only when their parent stages are successfully completed.
This elimination can improve
DAGSchedulerperformance.How was this patch tested?
Added some checks and other existing tests, and our projects.
We have a project bottle-necked by
DAGScheduler, having about 2000 stages.Before this patch the almost all execution time in
Driverprocess was spent to processsubmitStage()ofdag-scheduler-event-loopthread but after this patch the performance was improved as follows:dag-scheduler-event-loopthread timesubmitStage()