-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve performance of workload installation #24843
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
Comments
Ok, so some details on this issue. Here is an example of when only the NuGet.org source is used: So using multiple NuGet sources seems to influence the |
Yeah, NuGet's performance can degrade quickly when multiple feeds are being searched. Since individual packs don't have dependencies like traditional packages, we might be able to make gains if the downloads happened in parallel since that should be when the feeds are being searched. Parallel installs probably won't make a difference and even if it did, it would only benefit file based installs since MSIs must be executed sequentially. |
So, MSI installs will be slower than package based installations. There's a lot that happens. Every file is backed by a separate component, every component gets its own entry in the registry, which does add additional I/O. And becasue we don't support upgrades for workloads, we have to do full uninstalls/installs, which when you have large MSIs with lots of files can take very long. |
The performance of the install is affected by a few things:
I don't think we can do much about feeds. @jonathanpeppers , am I correct that this was a clean machine without existing files and the feed was the primary source of pain? Is it worth a flag to generate output for the performance of the nuget search, download, and install pieces? |
@marcpopMSFT yes, this should have been a clean install. It was the Mac Hosted Pool on Azure DevOps, fresh install of .NET 6, followed by If the performance of workload commands is something being worked on for .NET 7 (or future), let me know if I can help. We could try attaching |
@jonathanpeppers the dotnet-install script only installs the SDK/runtimes. That's significantly smaller compared to the maui workload I think. Do you recall how many feeds were involved in the original build? |
I retained the build forever when I filed this, can you see the full log here? At the time, the command was:
So we had a feed for dotnet/runtime, emsdk, dotnet6, and then NuGet.org. |
I can access the full log, thank you |
@joeloff is there a way to:
This would help speed up CI and local development for some of our repos. Is there a way to do something like this? |
There is a |
@joeloff I tried |
As of .NET 7.0, installing workloads for ios, android, catalyst and macos takes about 1.5 minutes to complete on an azure devops hosted agents. Is there some additional work planned to improve this further? |
It's gated on the number and size of the packages. I wonder if maybe we could parallelize the nuget downloads to get some performance though that would end up with network/io bottlenecks. For windows admin installs, the msi installs would have to be serial so there are limits of what we could improve there other than ensuring the downloads are gated by the installs of the prior packs. @joeloff want to try doing the download in parallel and see what happens? Probably the biggest improvement would be workloads adopting workload pack groups which would combine workload packs into fewer numbers of nugets. |
Takes > 6 min to run: Workflow file
|
@Peppe426 my understanding is the Are you running the |
I did not know about |
They list it on the image here: |
Just tested on
|
I have similarly terrible performance with workload install, in my case it spends a long time on 'Installing workloads: wasm-tools' (app is blazor web). I've tried switching the agent from ubuntu to windows latest, it doesn't seem to help. It's wildly variable, 3-9 minutes. |
Is your feature request related to a problem?
dotnet workload install maui
seems to take about 6 minutes on the Mac hosted pool, while thedotnet-install
script only takes ~13 seconds. See an example here:https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=5972136&view=logs&jobId=96c3d711-2288-532e-87f7-1a666089720f&j=96c3d711-2288-532e-87f7-1a666089720f&t=907c59ba-a277-5b2e-83ee-ef1e51b38284
Is there maybe some performance issues to look into here? We could also look into reducing packs in the
maui
workload if that would help.This problem might be worse on Windows because of the use of
.msi
, we can get an example of that if needed.Describe the solution you'd like
If
dotnet workload install maui
only took a couple minutes, that would be great.The text was updated successfully, but these errors were encountered: