-
Notifications
You must be signed in to change notification settings - Fork 83
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
DEVPROD-7330 Don't use toolchain with intermediate build and debug artifacts #1217
base: master
Are you sure you want to change the base?
Conversation
5ca4be0
to
77d96ad
Compare
0bdb565
to
b25f3d3
Compare
958150e
to
e9f8dc2
Compare
e9f8dc2
to
f3a9290
Compare
Adding @johndaniels and @jimoleary as reviewers here. The change is small and I believe it is performance neutral, but I don't have a good feeling for CMake or vcpkg |
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.
q about the toolchain id
@@ -199,7 +175,9 @@ class ToolchainDownloader(Downloader): | |||
# If we were 💅 we could do the string logic here in python, but we're not that fancy. | |||
# | |||
|
|||
TOOLCHAIN_BUILD_ID = "cf5743e0a96212cb7fae298399b1759489723cdb_24_04_16_17_45_56" | |||
TOOLCHAIN_BUILD_ID = ( | |||
"patch_cf5743e0a96212cb7fae298399b1759489723cdb_664d957bd979e30007b58a69_24_05_22_06_49_32" |
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 assume this changes to a non-patch id before the final merge?
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.
Yep, the PR in vcpkg needs to get merged so I have a real ID. After that I'll update it, get green on these tests, update the mongo patch tests and get green on those.
I'll be specifically checking that Genny stops trying to download the same toolchain several times once it has a real ID that it can compare to the git rev-parse it performs on the toolchain dir.
Awesome! |
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 mod the real toolchain id.
Jira Ticket: DEVPROD-7330
This PR reduces the download and decompress stage of the genny install from 1.25 minutes to 5 seconds. This reduces the total genny setup time from 6.8 minutes to 5.5 minutes, and reduces the genny compile time from 4.5 minutes to ~3.1 minutes.
The PR in vcpkg must be approved and merged in first, to get a real build ID to use in this PR.
In a standard Genny setup on an average configuration (
infrastructure_provisioning = replica
) (metrics here) takes 6.8 minutes. The steps are:workload_setup.genny.1.on_workload_client
, (bash script here). This is downloading and installing the mongodbtoolchain and installing Development Toolsworkload_setup.genny.2.on_workload_client
, (bash script here). This is the "Genny Compile"It takes 1.25 minutes to download and install the gennytoolchain because the gennytoolchain is 2.98 GiB zipped (8.8 GiB uncompressed). Much of this is intermediate build files (4.9 GiB), duplicates of packages (1.8 GiB), downloads (319.2 MiB) and debug symbols (1.2 GiB).
An example of the different toolchain archives on Amazon 2 arm64 is before/after.
This PR strips as much as possible from the built image to end up with a gennytoolchain that is ~250 MiB (~600 MiB uncompressed). This makes it significantly quicker to install Genny on workload clients. The following has been removed:
It slightly re-works the vcpkg integration, pointing at the explicit
release
andhost
target rather than the default (with no suffix). This should result in the same built Genny, but we are being explicit about using therelease
install which does not also come with debug symbols (and has a cmake config stating this).Patch test with some Genny workloads is here, with timing info here (compare with mainline here). Note that this seems to download and install the Gennytoolchain several times, because Genny does not recognise a toolchain that comes from a patch as "Valid". This will be retested once the vcpkg commit builds.
Testing that compile is unchanged
The following is comparing a
CMakeCache.txt
andcompile_commands.json
to make sure nothing is changing from statically to dynamically linked (or vise-versa).arm64-osx
is equivalent toarm64-osx-release
, exceptarm64-osx
includes debug symbols underdebug/lib
. The libraries in both are static.vcpkg
does not seem to do repeatable builds, butinstalled/arm64-linux{,-release}/lib/libgrpc.a
(e.g., the old non-release grpc library and the new release one) are both exactly 19,649,542 bytes. They seem identical but have different hashes.`CmakeCache.txt`
`compile_commands.json`