build,win: build,win: replace LTCG with Thin LTO for releases#63114
Open
StefanStojanovic wants to merge 2 commits intonodejs:mainfrom
Open
build,win: build,win: replace LTCG with Thin LTO for releases#63114StefanStojanovic wants to merge 2 commits intonodejs:mainfrom
StefanStojanovic wants to merge 2 commits intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR continues the work started in #62761, by using Thin LTO instead of LTCG for Node.js release builds on Windows.
The original idea was to switch from LTCG to Thin LTO, but it was noticed that this led to OOM errors on the release CI machines. As a result, a new option
lto-jobswas added to limit the LTO job parallelisation, thus decreasing peak memory usage. That meant making the compilation (linker step) longer, but doable.I've run benchmarks (10 runs each, on Windows x64) from Node.js, and the results are here. They show that this change improves performance in some cases, while some stay unaffected.
The second thing is the build time. I've had a few successful runs building this in the release CI (run1, run2), and the times were around 3 hours and 10 minutes on both x64 and arm64. This is quite an increase in what we see with LTCG, which is around 1 hour 10 minutes for x64and 1 hour 40 minutes for arm64. The main reason for this is the decreased linker parallelisation, which was needed because the machines we use for compilation have only 8GB of RAM. However, given the number of runs we have in the release CI and the number of machines we have there, this should be acceptable. (We have 3 machines, and each job does 2 Windows compilations).
cc @nodejs/releasers @nodejs/build
Refs: #61964