-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Avoid copying PriorityConfig and SchedulerExtender structs for every node while running priority functions #71722
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsalamat The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
04da3e1
to
76591db
Compare
/lgtm |
While avoiding those copies seems to be important, I cannot verify that the PR improves performance. With this PR:
Without the PR:
|
/retest Review the full test history for this PR. Silence the bot with an |
I figured what caused the performance degradation after #70274 and #70892. It was not extra copying, it was the fact that our original code used to run old-style priority functions in parallel to the map-reduce style ones. Benchmarks results with the latest version of this PR:
|
for i, priorityConfig := range priorityConfigs { | ||
if priorityConfig.Reduce == nil { | ||
for i := range priorityConfigs { | ||
if priorityConfigs[i].Reduce == nil { |
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.
Just out of curiosity. There will never be a situation when Function != nil and Reduce != nil, right?
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.
That's right. The Map/Reduce functions are the new style for priority functions. The old-style was using "Function". No priority function is supposed to mix the two and none of our priority functions do that.
/retest |
/lgtm great catch! |
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.
/lgtm
/retest Review the full test history for this PR. Silence the bot with an |
…22-upstream-release-1.13 Automated cherry pick of #71722 upstream release 1.13
What type of PR is this?
/kind cleanup
For lack of a better "kind", I should mark this as a clean-up, but this has caused performance regression in the scheduler.
What this PR does / why we need it:
There has been a performance degradation in the scheduler. We suspect it is caused after #70274. This PR fixes the issue and applies the same fix to several similar existing code with the hope that it fixes the issue.
Which issue(s) this PR fixes:
Fixes #
fixes (hopefully) #71659
Does this PR introduce a user-facing change?:
/sig scheduling
cc/ @wojtek-t @krzysied