6 ms·
Anyone know why macOS updates take so long? It's nuts, I just upgraded to one of the new MacBooks and even on that it took about 20 minutes to upgrade from 12.0
by c7DJTLrn 5y ago
Anyone know why macOS updates take so long? It's nuts, I just upgraded to one of the new MacBooks and even on that it took about 20 minutes to upgrade from 12.0.0 to 12.0.1, so not even a major release upgrade. The CPU is wicked fast, the SSD is wicked fast, so why does it feel like I'm suddenly using a Pentium when upgrading?
- Tagbert 5y agoIn the last couple of version, updates are no longer differentials but full OS updates. They are shipped as a single signed package that is loaded into one of the protected volumes of the disk. This is supposed to be a security measure to prevent compromises of components of the OS. The downside is big slow updates. Hopefully they work on that and do more like the differential updates that they use for iOS.
- yjftsjthsd-h 5y agoThey could still apply a tiny patch and then checksum the whole thing, surely?
- kaba0 5y agoJust divide the whole thing into read-only units and reuse the unchanged ones, a la nixos.
- dymk 5y agoAnd if the checksum fails, what then?
- howinteresting 5y agoUse a Merkle tree.
- wazzaps 5y agoMaybe checksum before updating? Or revert the patch if it fails?
- yjftsjthsd-h 5y agoThen abort the update? I'm not objecting to A/B partitions or filesystem snapshots or boot environments or however you want to implement it, I'm just saying that you can reconstruct the install image on the machine rather than downloading the whole thing over the wire.
- waterhouse 5y agoThen fall back to downloading the full OS image. Then the worst case would be about the same as today, while the common (99.9%+) case would be fast and bandwidth-cheap. (Optimization: hash tree, figure out which specific files are broken and download only those.)
- maxgashkov 5y agoiOS updates are not exactly fast either. I've never seen latest iPad or iPhone updating in less than ~10 minutes, even for minor changes with the ~200-300 Mb update size.
- vinay427 5y agoTo be fair, iOS updates also feel ancient compared to the Android live-update method which just requires a slightly longer reboot. On Android, I sometimes ended up on major releases and didn’t even notice because it just showed up upon my next reboot. On iOS I’m stuck without a phone for 10-15 minutes, which isn’t usually a problem when planned but feels rather archaic. To emphasize, this isn’t really a serious issue for most users, I’d imagine. I just wouldn’t want to see this as the model for improved Mac updates.
- glandium 5y agoOne reason is macOS updates are using LZMA, which is not exactly fast to decompress.
- c7DJTLrn 5y agoYikes. As a Linux guy my instinct is to go in and fix that but I can't :( it hurts sometimes. I recall also that a guy hacking around with Linux on the M1 found a CPU feature for VM optimisation that isn't implemented in macOS. Again, would love to add support for that, but I can't.
- easton 5y agoI’ve been feeling that too as I’ve been trying to do little bits of open source. Windows has a ton of little bugs that probably wouldn’t take much to fix, but the feedback goes into a black hole. I asked someone at Microsoft about it one time on GitHub, they said “that’s broken, but even if we started the work now and fixed it, you won’t see it for a year”. I get there’s good reasons for that sometimes, but other times things just don’t work right.
- marcodiego 5y agoActually, for mature critical parts of a linux distro, even small changes can take years to reach end users. I bet that changing the compression used by apt would need a little study of libapt, than understand the process to send the patch... in the specific case of apt, you'll have to write unit tests and persuade developers to accept your changes. If it is accepted you'll may have to wait maybe even 3 years for it to finally reach an Ubuntu LTS when it will finally be deployed to end users who limit themselves to LTS versions by OEM vendors. In the end, I understand them. A good balance between stability and new features is needed.
- bombcar 5y agoThe advantage on Linux and friends is that if you really want or need the fix you can apply it yourself.
- pronoiac 5y agoIt feels like it's rehashing and verifying every file in the OS.
- c7DJTLrn 5y agoYet at the same time it doesn't feel like it's doing any work. It's an M1 Pro but I still don't hear the fans kick in or feel it warming up at all. So I feel like there is probably room for optimisation, whatever the update process does.
- ksec 5y agoThat is just M1, it sure eat up all CPU when doing it on x86.
- jeffbee 5y agomacOS schedules software updates on the "efficiency" cores of the M1, which is why it takes forever and doesn't seem to cause any slowdown.
- c7DJTLrn 5y agoThanks for the info. Wow, any idea why? How do you know this?
- jeffbee 5y agoI noticed it in Activity Monitor one day, then I looked at the docs and it’s a documented behavior.
- booi 5y agoThat’s actually pretty amazing. But sometimes I’ve set aside time to do the update and I’d like it to go as fast as possible. I wonder if there’s a way to force it on the performance cores?
- jeffbee 5y ago
- webmobdev 5y agoMy theory - I believe that BigTech started releasing huge updates to normalise having an always-on internet connection during updates and normalised the slow update process for the opportunity it provides them to mine and analyse all data on your computer. Often an update is the only time when they can (and do) reset and toggle all the privacy settings back to their favour, and then do on device analysis (like collecting meta data of all your files or analysing your photos etc.). They can then send the data back to their servers to add to your profile they have on you unencumbered (no pesky application firewalls to deal with it). That's why I always make it a point to immediately switch off my router after downloading an OS update and starting an install. (Both Windows and macOS spend a lot of time in indexing your files - processes which can also be done post-installation - and doing all sorts of on-device analysis on your files to provide some specific feature, for example facial recognition on photos. And both collect a lot of your data during this process.)
- ChildOfChaos 5y agoNo different from any other OS, feature updates take forever on Windows.
- howinteresting 5y agoTheyre much faster on Linux and Android.
- schleck8 5y agoThey are pretty fast on my PC and I don't even have an NVMe SSD
- rbanffy 5y agoI was just doing it on my Windows box and it maxed out the hard disk's IO for about an hour. I don't know what it was doing in the background, but, compared to what it was downloading, it was a surreal amount of work. It's understandable Windows updates take longer because Windows offers the guarantee that a file path will always point to the same while the machine is running, as opposed to Unix environments where they only guarantee your file pointer will point to the same file. This makes upgrading a running machine a bit more complicated than replacing files from under running processes. I'm not even sure how I would implement such a thing. Probably file system overlays and collapse them on reboot.
- havkd 5y agoIt’s imposible it maxed out your IO for an hour unless you have a mechanical disk.
- rbanffy 5y agoIt has a mechanical disk. It’s the machine I use to test and build things under Windows. Still, it’s crazy when compared to the sister box that’s identical but runs Ubuntu, which remains usable through the whole upgrade process (and takes a lot less time unless it’s a full OS upgrade)