by chmln · 8y ago · 0 comments
Not only they take ridiculously long, eventually you are forced to update upon booting in or shutting down. Never mind that you turned on your PC to, you know, get something done potentially urgently.
In contrast, I can upgrade my months-stale arch Linux box in under 2-3 minutes. After seeing how much better the same hardware can run, there is no going back.
However, that being said, Windows Update for me as a user that would apply all updates anyway, was unbearably slow, and a big part of the reason that I switched to Linux and FreeBSD years ago and never looked back.
I guess for enterprises that want to deselect certain updates for various reasons relating to their setup, Windows Update is probably a great selling point.
I still don’t get why it has to be so slow for the default case where all updates are applied though.
https://techcommunity.microsoft.com/t5/Windows-for-IT-Pros-M...
This could be me being completely ignorant of the details, but doesn't Linux have the same thing? I can individually apply package updates, even mess with dependencies -- but my computer updates quickly and doesn't require multiple restarts during the process. Usually, unless I'm updating the kernel itself, I don't even need to restart.
What are they doing that's even more granular than Linux's update process?
Obviously, this is rather insane and takes up a gigantic amount of disk space, and wasn't something they ever implemented. They must have realised this, so they built a facility into their DISM.exe utility to remove all updates that were superseded by the service pack (the switch is /spsuperceded). DISM.exe was released in Windows 7 SP1.
Note that there has never been, and never will be, a Windows 7 SP2, because Microsoft decided to go with the rolling update schedule. What this means, however, is that /spsuperceded will never work as they have never actually gotten to a second service pack.
It appears to me that Microsoft must have forgotten the original plan for clearing out old and useless patch files from SxS, because they rather surreptitiously introduced a new option into the disk cleanup wizard to remove old Windows Updates (to get to it, you need to elevate to admin via UAC in the GUI). This removes the old updates.
I have literally had systems with around 6-8GB of old Windows Update files. The biggest issue is that you think they are deleted, but it appears that Microsoft actually removes the updates after you reboot. I've had one system that took an hour to reboot as it was removing so much junk. I had a friend who had an even worse system, and he had to leave it overnight...
Here's another fun fact (not sure if it's fixed in Windows 10...) but the WinSxS folder is where system files are kept. NTFS does a symbolic link to these folders back to the System32 folder. The problem is that the metadata is updated in one location only, and so if you check the WinSxS folder and the System32 folder, you'll see different file sizes for each folder.
I have no idea how MS implemented the OS upgrade process this bad.
Considering that Microsoft still does have a lot of really bright engineers, I'm leaning towards the latter.
The POSIX approach makes it easy to install updates without rebooting but opens you to weird failures if a process loads things during an update and gets the new library A and old library Z. This is generally a much easier problem to handle.
You can't just replace the files and reboot because you can't write to files while they're open, especially executables; so what happens is a huge pile of files get queued for swapping over at reboot.
I think the main reason Windows Update takes so long is that it has its own database, WSUS, which degrades badly as it fills up.
Two things I don't understand: why updates are so slow; and why the updating can't be done out of band. Seems like it could be done either with hardlinks or using VSS, so that it's safe to do as a background process rather than effectively kicking the user off their own system for the entire duration. Both hardlinks and VSS have been around forever on NTFS.
While ReFS supports volume snapshots (but not hardlinks), its rollout as a replacement for NTFS appears stalled, only being recommended for specific use cases that aren't the general purpose use case (system disk).
2) Updates can be slow for a bunch of reasons. One of them is that the WU agent as shipped in e.g. Win7 SP1 had some nasty O(n^2) or worse operations that got fixed in [1] and later. One of the reasons the monthly rollups versus itemized bits were an enhancement is, if your install for each update is NUMUPDATES* O(start transaction + do install of update bits + swap into place + end transaction) , removing all but one of the start and end transactions is a nice speedup.
As far as using hardlinks and VSS to stage and swap updates into place...that is a thing that WU does already, and has done for quite some time.
ReFS also makes me sad because it has so much potential, but they rolled it out without being able to used for many use cases, so it's probably gonna stall and die.
[1] - https://support.microsoft.com/en-us/help/3161647/windows-upd...
Honestly, if Microsoft would fix this one thing, I suspect they could speed up their update process by a factor of 2 or 3, possibly higher.
As an aside, the Windows Update datastore and the Windows AD datastore must be seriously some of the very last things to use the ESENT. Dunno if Exchange still uses it. Awful way of doing things though.
Windows Update is overly complicated and utterly unweildy. My perspective is that it was rather bolted together in the years when Microsoft decided to make the filesystem a database. They now have an inelegant mess that they cannot easily get rid of. I would hate to be someone who had to work on Windows Update code!
1. https://docs.microsoft.com/en-us/windows/deployment/update/w...
[1] - https://support.microsoft.com/en-us/help/3161647/windows-upd...
Using slapt-get (Slackware version of apt-get) back in the day was quite the revelation after manually solving dependencies.
Because it is way more complicated than apt: https://docs.microsoft.com/en-us/windows/deployment/update/h...
The fact that they didn't have a mechanism to forcibly install said improvement updates in the older versions before they install the kitchen sink for hours is infuriating, but I can't be that annoyed at them for not rewriting history.
I can, however, be annoyed that they decided never to formally make an SP2 and consequently left anyone running those Win7 environs up shit creek without a paddle, though I imagine that's a bug not a feature, given how afraid they are of another XP.
[1] - https://decentsecurity.com/enterprise/#/windows-7-fast-updat...
I believe someone mentions that feature updates like 1809/1803/etc are not actual patches based on current install, it is a complete OS reinstall, which explains the slow install.
See e.g. https://insider.windows.com/en-us/articles/were-listening-to...
However, the same comparison holds. I have an older backup PC in the basement with a hard drive, and it still takes just a few minutes to update in the background on Linux. Windows on that machine was simply unusable.
Single thread and cpu limited would explain it, since what I do have is almost unbeatable single-core performance from a high OC on an old i5.