Uh oh!
There was an error while loading. Please reload this page.
[SPARK-15176][Core] Add maxShares setting to Pools - #12951
Conversation
There was a problem hiding this comment.
I believe this line exceeds 100 characters.
njwhite
commented
May 6, 2016
@HyukjinKwon I've run |
@njwhite I am not a committer but just one of contributors. I guess most of codes were written by @kayousterhout in this part. |
ash211
commented
May 16, 2016
Ping, anything more needed on this PR before merging? |
rxin
commented
May 19, 2016
cc @kayousterhout for review |
kayousterhout
commented
May 19, 2016
I commented on the JIRA. |
squito
commented
May 19, 2016
Hi @njwhite, I'm not sure I see a strong need for this -- I posted a msg on jira (as Kay had earlier). We should keep discussion about the feature in general there, for archive / searchability. In any case I did look at the code, so a couple of comments about that, if we do decide we want this feature. Unless I'm missing something, it doesn't seem like Also to go along with that, we'd want new test cases demonstrating how |
There was a problem hiding this comment.
as long as you're touching this, switch to using string interpolation. (eg. s"Created default pool $DEFAULT_POOL_NAME, ...). Also since this is repeated a few times, you might just add a helper logPoolCreated(pool) or something.
b4b7624 to
c4082c5Comparenjwhite
commented
May 20, 2016
Thanks for the review @squito - I've commented on the JIRA about why this feature would be useful. As for the implementation - maybe "maxShare" is the wrong word, as the change doesn't relate to the fair scheduler at all. Instead it limits the maximum number of tasks a |
squito
commented
May 20, 2016
ah, I completely overlooked The added tests verify that Calling it "maxShare" is pretty confusing -- with this implementation it should probably be called "maxRunningTasks" or something. It also seems pretty hard to configure, though, I wonder if users really do want maxShare. We should be sure that whatever we add is what want long-term, so we're not stuck with complexity from a legacy setting. honestly I am still uncertain about adding the feature, need to think about it more -- I'm just giving my comments on the code here. A very clean, well-tested PR can help make your case, but OTOH can also turn into wasted effort ... |
squito
commented
May 20, 2016
Jenkins, ok to test |
SparkQA
commented
May 20, 2016
Test build #59030 has finished for PR 12951 at commit
|
njwhite
commented
May 27, 2016
Thanks @squito; I've renamed the setting to |
SparkQA
commented
May 27, 2016
Test build #59497 has finished for PR 12951 at commit
|
e100683 to
0669b49CompareSparkQA
commented
May 27, 2016
Test build #59498 has finished for PR 12951 at commit
|
SparkQA
commented
May 27, 2016
Test build #59501 has finished for PR 12951 at commit
|
markhamstra
commented
May 27, 2016
Added my comments to the JIRA. In short, I think there is a legitimate use case for this, and there is a significant gap in our current fair-scheduling pool API. Implementing a maxShare property is actually something that has been on my todo list for awhile. |
njwhite
commented
May 28, 2016
Thanks @markhamstra! The Jenkins build failed because a single test, |
There was a problem hiding this comment.
The test case should include scheduling another taskset to a different pool which does not share the limitation, and making sure it can still schedule tasks even when the first task set gets limited.
njwhite
commented
Jun 6, 2016
@squito thanks - I've expanded the |
SparkQA
commented
Jun 6, 2016
Test build #60036 has finished for PR 12951 at commit
|
njwhite
commented
Jun 13, 2016
@squito is this OK? |
There was a problem hiding this comment.
Does it make sense to move this to Schedulable.scala? It looks like Pool and TaskSetManager both have the same implementation (assuming that Int.MAX_VALUE is the default).
kayousterhout
commented
Jun 13, 2016
The naming on this PR is somewhat confusing, because it looks like maxShares is supposed to return the maximum number of remaining tasks that can be run, rather than the maximum number of tasks that can be running at a time. The current name implies the latter. Is it possible to use a more descriptive name for this? maxRemainingTasks? I don't have a great idea here but maybe others do? |
kayousterhout
commented
Jun 13, 2016
Also, once naming is settled on, this PR should include a documentation update to this page: https://spark.apache.org/docs/latest/job-scheduling.html to describe this. |
Help guarantee resource availablity by (hierarchically) limiting the amount of tasks a given pool can run. Also adds support for specifying the parent pool in the "spark.scheduler.allocation.file".
SparkQA
commented
Jul 4, 2016
Test build #61724 has finished for PR 12951 at commit
|
njwhite
commented
Jul 4, 2016
Hi @kayousterhout - I've renamed all references to |
njwhite
commented
Jul 15, 2016
ping? |
kayousterhout
commented
Oct 4, 2016
@njwhite sorry to let this idle for so long. I just read through the comments here and on the JIRA and it looks like the consensus on the JIRA was that it would be better to implement maxShare instead of maxRunningTasks, because it's likely easier to configure, and also is less brittle to the cluster size. Can you implement that change? Alternately if you think this should remain maxRunningTasks, comment on the JIRA and we can continue the discussion there. |
kayousterhout
commented
Oct 12, 2016
@njwhite do you have time to work on this and implement maxShares? If not, can you close the PR? |
njwhite
commented
Oct 13, 2016
@kayousterhout minShares is a configuration parameter for the fair scheduler algorithm only - what would the semantics of a maxShares setting for the FIFO algorithm be? |
njwhite
commented
Oct 13, 2016
Actually, @kayousterhout - I'm not entirely sure what you expect for the semantics of maxShares in general. Maybe a worked example would help: if I have a pool X with 5 running tasks from Taskset A and a maxShares of 7. Pool X is a child of pool Y which has a maxShares of 8. I want to the schedule another task from Taskset A, so should the scheduler allow it or not? Do you need to know how many executors are currently running (and so the maximum number of tasks that could be run)? |
jiangxb1987
commented
Jun 19, 2017
Should we process with this PR or should we close this? @kayousterhout@njwhite |
AmplabJenkins
commented
Feb 28, 2018
Can one of the admins verify this patch? |
Closesapache#17422Closesapache#17619Closesapache#18034Closesapache#18229Closesapache#18268Closesapache#17973Closesapache#18125Closesapache#18918Closesapache#19274Closesapache#19456Closesapache#19510Closesapache#19420Closesapache#20090Closesapache#20177Closesapache#20304Closesapache#20319Closesapache#20543Closesapache#20437Closesapache#21261Closesapache#21726Closesapache#14653Closesapache#13143Closesapache#17894Closesapache#19758Closesapache#12951Closesapache#17092Closesapache#21240Closesapache#16910Closesapache#12904Closesapache#21731Closesapache#21095 Added: Closesapache#19233Closesapache#20100Closesapache#21453Closesapache#21455Closesapache#18477 Added: Closesapache#21812Closesapache#21787 Author: hyukjinkwon <gurwls223@apache.org> Closesapache#21781 from HyukjinKwon/closing-prs.
What changes were proposed in this pull request?
Help guarantee resource availablity by (hierarchically) limiting the amount of tasks a given pool can run. The maximum number of tasks for a given pool can be configured by the allocation XML file, and child pools are limited to at most the number of tasks of their parent.
How was this patch tested?
Unit tests run and new unit tests added for functionality.