So I got a new machine. Windows 11. Brand new. It's stuck updating. It is taking ages. Why? Well, I don't have any definitive answers but my most basic instinct is to always attach a profiler -- I recommend the excellent @superluminal .

It turns out that there is this thing in the background, TiWorker.exe, and it's taking its dear time while burning through CPU cycles. This is part of the "Windows Module Installer" service, which handles updates.

Why does it take so long? Some cleanup! Seemingly, for every single package, we:
1) create some "Execution Object"
2) execute it
3) clean it up
Creating the object takes 2.8s. Deleting the object takes roughly 16s. Running the actual operation takes 125ms. So about 99.5% is just overhead.
Deleting the request takes 16s because every new request spins up a new "Servicing Querier", which then starts preloading "all components" (16s!), and we need to wait for this to finish before we can move on _and then repeat the same thing for the next package_.
Creating the request takes 2s because it enumerates all packages. Does it have to do that from scratch every time? The request by the way spends the majority of the time just persisting state to disk. (Maybe that's necessary because someone might kill this?)

I have no idea whom to tell that at Microsoft. Is this a known problem? Are there good reasons for this? Am I holding it wrong?

But I have done some back-of-the-napkin math: At roughly 19s per package, and assuming I have 10000 packages installed, and assuming there are no additional such steps, the update will hopefully finish in 53 hours.

I'll add a post when the update has finished.

It finished! I had already waited for a day when I started to look into what went wrong (with some restarts). Not sure what the precise walltime then is, but it's somewhere in the 30h range.

In a cruel twist, there are now two more updates, and they just fail immediately :)

@sschoener they took “fail early and fail fast” advice seriously

@aras I actually prefer this to waiting for two days while something assures me that they "are definitely still doing important work so please don't kill the process."

It's scary to think how many times I just kill stuff because I don't think that it can possibly be doing meaningful work for so long, haha.

@sschoener I asked Steve DiAcetis, responsible at MSFT for Windows Update, about this issue. He replied: "I shared this issue with others on the team, turns out this is a known issue that is actively being worked on. I don't have an ETA yet for when a fix will ship."
@sfiruch thank you very much, appreciated!
@sschoener Once again begs the question "what the hell is everybody doing?!"
@molecularmusing I think I answered what everybody's doing pretty conclusively: waiting for windows update to finish 😛
@sschoener @molecularmusing This highlights how superluminal is awesome and how shitty windows is.

@sschoener possible some of this is recently improved: https://www.theverge.com/2024/10/23/24277844/microsoft-windows-11-24h2-windows-update-improvements

But, still, Fucking Yikes 😬
Thanks for posting, it was good for a hearty IRL laugh.

Windows 11 updates now install significantly faster and use less CPU

Microsoft has made some big changes to Windows Update in Windows 11. The latest 24H2 version reduces update install times, restart times, and CPU usage.

The Verge

@gorlak Thank you. But I have bad news (see picture below) 😛.

Also, "big scary update" sounds like something that might be... extra... slow to update to, haha.

Otherwise it's of course great to hear that they are apparently looking at update performance.