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
Make parallel build memory threshold configurable #96882
Make parallel build memory threshold configurable #96882
Conversation
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
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
/test pull-kubernetes-e2e-kind |
/lgtm |
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
@kubernetes/milestone-maintainers can we get this over the finishing line? |
@saschagrunert that's not the issue, you're missing an approver: Lines 18 to 31 in 6d43e2b
go chase one of these fine folks down :) |
/hold So this variable is designed to be used as a deciding factor where if you have more than this amount of memory, you can build in parallel.. and below it, we don't because you experience errors during the build. I'm not clear on how making this configurable changes this. I'd be okay with is making it configurable in general, but can we expand the comment to provide more context on what this variable does and why? |
hack/lib/golang.sh
Outdated
# As of January 2018, RAM usage is exceeding 30G | ||
# Setting to 40 to provide some headroom | ||
readonly KUBE_PARALLEL_BUILD_MEMORY=40 | ||
# Defaulting to 40G to provide some headroom |
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 comment doesn't make sense anymore if this isn't hard coded
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.
Added a note that it can be overwritten at our own risk, whereas it still defaults to 40GB.
The amount of memory required to build binaries in parallel is right now set to 40GiB. We now make this variable to be able to build artifacts in parallel even with a lower amount of memory. This enables SIG Release to speed-up the build time drastically in Google Cloud Build (GCB). Signed-off-by: Sascha Grunert <sgrunert@suse.com>
d0906fe
to
9428ad7
Compare
@cblecker do you think you can give this another look? :) |
If we're able to lower this, perhaps the default is higher than it needs to be? |
Yeah probably, this was just a test coming from our GCB instance. I was just a bit conservative in changing the default because I did not really know which impact it would have on existing build systems using older go versions. WDYT? |
/area release-eng |
Your GCB instance is using newer than k/k? Or is the concern about backporting to older branches? Ideally we should have a reasonable default on the current branch, which will evolve with time? |
Yeah it was mainly about the backports.
I think we could play around with the value together with CI signal as follow-up. |
@BenTheElder do you think we can move forward with this PR and benchmark the actual required threshold after we made it configurable? |
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.
/approve
/lgtm
/hold cancel
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cpanato, hasheddan, saschagrunert, spiffxp, xmudrii 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 |
Sorry E_TOO_MANY_PRS. Looks like Aaron got it 😅 |
/test pull-kubernetes-unit |
…82-upstream-release-1.20 Automated cherry pick of #96882: Make parallel build memory threshold configurable
…82-upstream-release-1.18 Automated cherry pick of #96882: Make parallel build memory threshold configurable
…82-upstream-release-1.19 Automated cherry pick of #96882: Make parallel build memory threshold configurable
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
The amount of memory required to build binaries in parallel is right now
set to 40GiB. We now make this variable to be able to build artifacts in
parallel even with a lower amount of memory.
This enables SIG Release to speed-up the build time drastically in
Google Cloud Build (GCB).
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
cc @kubernetes/release-engineering
/sig release
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: