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

kustomize 3.8.2 onwards builds are REALLY slow when using vars #3158

Closed
dan-slinky-ckpd opened this issue Oct 30, 2020 · 2 comments
Closed
Labels
area/api issues for api module area/plugin issues for plugins kind/regression Categorizes issue or PR as related to a regression from a prior release. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@dan-slinky-ckpd
Copy link
Contributor

Releases 3.8.2 onwards are really slow to build when using a vars pattern.

$ time kustomize-3.7.0 build kustomize/overlays/ops-cluster >/dev/null
kustomize-3.7.0 build kustomize/overlays/ops-cluster > /dev/null  1.95s user 0.13s system 182% cpu 1.140 total

$ time kustomize-3.8.1 build kustomize/overlays/ops-cluster >/dev/null
kustomize-3.8.1 build kustomize/overlays/ops-cluster > /dev/null  1.99s user 0.13s system 181% cpu 1.165 total

$ time kustomize-3.8.2 build kustomize/overlays/ops-cluster >/dev/null
kustomize-3.8.2 build kustomize/overlays/ops-cluster > /dev/null  33.14s user 1.55s system 189% cpu 18.348 total

$ time kustomize-3.8.5 build kustomize/overlays/ops-cluster >/dev/null
kustomize-3.8.5 build kustomize/overlays/ops-cluster > /dev/null  33.70s user 1.58s system 184% cpu 19.122 total

After some debugging this appears to be the case when using the vars pattern. You can see the pattern we use here: https://github.com/dan-slinky-ckpd/kustomize_build_slow

If you remove the base/common and the configMapGenerator from the test overlay, the build speeds are the same between versions. With the vars pattern, the builds are slower and this is exacerbated when you have more resources.

With vars pattern:

testing 3.7.0

real	0m0.053s
user	0m0.060s
sys	0m0.013s

testing 3.8.1

real	0m0.051s
user	0m0.054s
sys	0m0.013s

testing 3.8.2

real	0m0.063s
user	0m0.083s
sys	0m0.016s

testing 3.8.5

real	0m0.062s
user	0m0.077s
sys	0m0.015s

Without vars pattern:

testing 3.7.0

real	0m0.044s
user	0m0.046s
sys	0m0.011s

testing 3.8.1

real	0m0.045s
user	0m0.051s
sys	0m0.014s

testing 3.8.2

real	0m0.043s
user	0m0.045s
sys	0m0.011s

testing 3.8.5

real	0m0.044s
user	0m0.048s
sys	0m0.011s

Platform

macOS

@Shell32-Natsu Shell32-Natsu added area/api issues for api module area/plugin issues for plugins kind/regression Categorizes issue or PR as related to a regression from a prior release. labels Oct 30, 2020
@Shell32-Natsu
Copy link
Contributor

First of all, we are planning to deprecate var transformer in the future. #2052

Secondly, we are in a big refactoring to remove apimachinery dependencies and migrate to kyaml and we will address performance issue about kyaml in near future.

@Shell32-Natsu Shell32-Natsu added priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Oct 30, 2020
@monopole
Copy link
Contributor

Thanks, i agree - vars aren't the only thing slower.
This is due to an ongoing switch away from apimachinery code.
Calling this a dupe of #2869.
Once the migration is done, performance bugs can be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api issues for api module area/plugin issues for plugins kind/regression Categorizes issue or PR as related to a regression from a prior release. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants