-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[v7.0.0-rc.1.22426.10] Extremely slow build of non-portable runtime on armv7
#75811
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
How did you build the runtime that is very slow? Is it release build?
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsNon-portable build of runtime v7.0.0-rc.1.22426.10 extremly slow in Environment:
Any pointers on what might be the problem with this?
|
My apologies for not specifying - this is as built in source-build tarball. Here are the build settings:
Indeed, configuration is set to |
For references, build on |
It means that some build commands take a lot longer in non-portable build. Are you able to identify these from the logs? |
Interesting - the extreme slowness only occurs with |
The above comment is a lie - the slowness on gcc was just a fluke. Basically back to zero. Building just runtime in non-portable mode outside of source-build finishes in 15 minutes, just like its portable counterpart. Moving to sourcebuild inflates that to hours. Essentially everything gets slower, there's not just one step that slows down. Of course, having timestamps on everything would be great to really measure out how long each steps take, but unfortunately I do not know of any switch that would do that |
I wonder if using -bl would help us check here for some high level broad timestamps. |
I'm trying now a build with
Full script here also crossbuild llvm, sdk, aspnetcore, installer and roslyn. |
Could the disabling of NgenOptimization and NoPgoOptimize be the cause for this? I had issues building them due to lack of pgo packages, thus disabled. |
Not something I expect to be so bad - provided that everything is crossgened all should work. And these switches don't provide that functionality. |
I tried full build with gcc and it fails with |
More data: I did some more in-depth baby sitting today, taking note of how long things take. The clang part of the build doesn't seem to be slower, it seems more like what's really slow is generating the dlls and nupkgs of non-portable runtime. The bootstrap is confirmed not the issue, and it would explain the out-of-sourcebuild difference as in those tests I did not specify --pack. Now my question is, why would |
The bulk of the work done by Non-portable builds use compression from the distro instead of the ones that come with the runtime (https://github.com/dotnet/runtime/tree/main/src/native/external). Maybe the compression that comes from the distro is much slower, possibly due to confusion about compression levels? |
Is there a setting that can disable use of system compression to rule that out? I also need to test |
Actually, we seem to be using the system libz everywhere, so I am not sure what can be the problem. |
Indeed, it isn't pack nor publishing - can't reproduce the issue out-of-sourcebuild when packing and publishing, I'm out of ideas on what's causing this so I'm gonna take the hit in builder time that this represents. It's just nuts how dotnet can take 8 hours to build on |
Setting |
Yeah, that step trims all the net7.0 out-of-band assemblies (for the current platform): runtime/src/libraries/oob.proj Lines 69 to 75 in 1f688ed
Presumably that means that the linker itself is the slow component on this platform? |
Might be related to dotnet/linker#2975. I'm building using a bootstrapped version of illink that was before rc1, I think. |
Building with |
You should be able to attach profiler or debugger to the process to figure out where it is spending so much time. I would start with https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters to check on the overall health of the process. The trimming step is an optimization that can be skipped. The build is still going to produce working binaries, they are just going to be a bit bigger. |
What flag can be set to skip trimming? Once linker is confirmed to be the issue, I'll spin up an arm32 environment and explore this further. |
I do not see any flag that can be used to skip trimming. You would need to edit the build files, e.g. replace runtime/src/libraries/oob.proj Lines 69 to 75 in 1f688ed
OOBAssemblyToTrim to OOBAssembliesTrimmedArtifactsPath
|
Note that this step doesn't impact the output binaries at all. This is just a validation step that writes to If you would like to skip this step locally, you could just remove the target entirely: runtime/src/libraries/oob.proj Lines 54 to 81 in 1f688ed
|
Current release/7.0.1xx of installer seems to not have this issue. Closing as seems fixed. |
Non-portable build of runtime v7.0.0-rc.1.22426.10 extremly slow in
alpine.3.17-arm
environment. Portable build w/ RIDlinux-musl-arm
has no issue, and v6.0.9 also builds without issue.Environment:
armv8l
environment (i.e. 32-bit userspace in 64-bit aarch64 environment)Any pointers on what might be the problem with this?
The text was updated successfully, but these errors were encountered: