-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
Add benchmark for updates and get with/without server-side apply #80944
Conversation
Speed-wise, for PATCH, it went from 1.82x to 1.44x, allocations went from 20x to 8x. |
/retest |
23de930
to
1122ce5
Compare
Updated the code, we now get the following results:
|
5625d70
to
00e1f06
Compare
return nil | ||
} | ||
|
||
func benchGetPod(client kubernetes.Interface, pod v1.Pod, num int) func(*testing.B) { |
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.
This is List, not GET
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.
Correct
b.ReportAllocs() | ||
for i := 0; i < b.N; i++ { | ||
c := make(chan error) | ||
for j := 0; j < parallel; j++ { |
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.
Why do things in parallel?
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.
We were suspecting this was making things even worse (closer to real-life system)
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.
I'm not sure if it's necessary to capture that in the benchmark, but I guess it doesn't hurt...
00e1f06
to
73d594e
Compare
73d594e
to
4de7b6d
Compare
/approve Can you fix the tests? |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: apelisse, lavalamp 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 |
I haven't changed tested code nor really test code, just new benchmark, so I suspect this must be flakes |
/lgtm |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
Add a high-level benchmark for repeated updates and get when server-side apply is enabled or not, as a way to compare the impact of enabling the feature.
The output is hard to read though because I haven't managed to disable logs altogether.
Still, the results are:
Get is not super relevant (especially with/without SSA because it's mostly dominated by overhead), we would have to insert many more objects to actually show the difference.
What type of PR is this?
/kind cleanup
Does this PR introduce a user-facing change?: