Skip to content
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

Possible performance regression when upgrading to 0.15.2 #2522

Closed
timflannagan opened this issue Oct 3, 2023 · 3 comments · Fixed by #2529
Closed

Possible performance regression when upgrading to 0.15.2 #2522

timflannagan opened this issue Oct 3, 2023 · 3 comments · Fixed by #2529
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question.

Comments

@timflannagan
Copy link

We recently bumped our controller runtime dependency to the 0.15.2 release. After running our internal performance suite against a build with the 0.15.2 c-r version, we noticed roughly a ~10-15% performance regression compared to previous builds that used the 0.15.0 c-r version. When gathering and analyzing pprof profiles from those affected builds, our controller was spending a lot more time in the MatchingLabels ApplyToList client method for that type compared to 0.15.0 builds.

Looking at the changelog diff between 0.15.0 and 0.15.2, we can make the assumption that the culprit for this regression at scale was #2098 due to the changes made to the client package. For additional context, our controller extensively uses the client.MatchingLabels list option when making client list calls.

@troy0820
Copy link
Member

troy0820 commented Oct 3, 2023

/kind bug support

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question. labels Oct 3, 2023
@alvaroaleman
Copy link
Member

The previous behavior was buggy. If you have ideas on how to speed up the non-buggy implementation, feel free to suggest them or raise a PR.

@timflannagan
Copy link
Author

@alvaroaleman Thanks for the quick reply - I'll see if I can shore up some cycles to look into this further. I'm guessing the issue is we're constantly re-shuffling the underlying set when adding new label selector requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants