-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support driver and executor pod use different priority #2146
Merged
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
32aa2b4
feat: support driver and executor pod use different priority
Kevinmmt bd7c2eb
feat: if *app.Spec.Driver.PriorityClassName and *app.Spec.Executor.Pr…
Kevinmmt 392e3e8
feat: merge the logic of setPodPriorityClassName into addPriorityClas…
Kevinmmt a791e07
feat: support driver and executor pod use different priority
Kevinmmt 4ccb6b9
feat: if *app.Spec.Driver.PriorityClassName and *app.Spec.Executor.Pr…
Kevinmmt 2a9b69c
feat: merge the logic of setPodPriorityClassName into addPriorityClas…
Kevinmmt 25fb23f
feat: add adjust pointer if is nil
Kevinmmt a39ae87
feat: remove spec.batchSchedulerOptions.priorityClassName define , sp…
Kevinmmt b781c3c
feat: remove spec.batchSchedulerOptions.priorityClassName define , sp…
Kevinmmt 921d31f
feat: remove spec.batchSchedulerOptions.priorityClassName define , sp…
Kevinmmt 74dbae6
feat: Optimize code to avoid null pointer exceptions
Kevinmmt a8d27ee
fix: remove backup crd files
Kevinmmt d4278ce
Merge remote-tracking branch 'upstream/master'
Kevinmmt ef6b393
fix: remove BatchSchedulerOptions.PriorityClassName test code
Kevinmmt 84ed21c
fix: add driver and executor pod priorityClassName test code
Kevinmmt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding, the
priorityClassName
inbatchSchedulerOptions
is utilized by Volcano's PodGroup, and it is unrelated to the priorityClass of Spark pods. Given this, it seems unnecessary to have theprioryClassSplitting
option or theaddDriverExecutorUnifyPriorityClassName
function. WDYT?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,
prioryClassSplitting
batchSchedulerOptions
may be a bit inappropriate, let me clarify my usage scenarioThe current business scenario has not yet used the ability of
podGroup
. The underlying K8s cluster is divided into multiple resource pools, and the SparkApplication task itself is defined with different priorities at the business level. Moreover, the resources of the underlying K8s cluster are limited. At this time, it is expected that high-priority executors can run first when resources are insufficient, so the PriorityClass priority preemption scheduling mechanism of K8s itself is usedBut because the default
PriorityClass
ofSparkApplication
is in thebatchSchedulerOptions
, it means that the driver andexecutor
under the sameSparkApplication
will be set to the same priority; but in the actual business scenario, there may be problems, such as we know that the driver is the controller of the executor, once thedrvier
node ispreempted
and expelled, the entireSparkApplication
will fail, and the expected effect of the business is that thedriver
pod cannot bepreempted
with high priority, and theexecutor
can bepreempted
with high priority, so that different priorities must be set for the driver andexecutor
, such as setting the highest priority for thedriver
, and the executor can have a low priority, so that after the low-priorityexecutor
is expelled, it will wait for high priority After the levelexecutor
is executed and there are free resources, theexecutors
of these previously expelled low-priority tasks will be created by the corresponding drvier podIf this is the case, how should this priority be defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kevinz857 Perhaps we can do as follows:
spec.batchSchedulerOptions.priorityClassName
is defined, it will automatically be propagated to both driver and executor pods by default, as this is the current behavior so that we will not make a breaking change.spec.driver.priorityClassName
orspec.executor.priorityClassName
is specifically defined, it should take precedence overspec.batchSchedulerOptions.priorityClassName
. In this way, we can eliminate the need to introducespec.batchSchedulerOptions.prioryClassSplitting
option as it is somewhat confusing. Also, users can define different priority classes for driver and executor pods.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChenYi015 Very good suggestion, I can modify the code and resubmit MR according to this proposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChenYi015 According to the latest proposal, if if either spec.driver.priorityClassName or spec.executor.priorityClassName is specifically defined, it should take precedence over spec.batchSchedulerOptions.priorityClassName.
Modified the code according to this proposal, please help review it when you have time, thanks