I am more and more astonished at the boot up speed of recent macs in comparison to similar Linux setups. Mac has a massive os but within a matter of a few seconds, the os is operational. Is anyone else noticing this and if so, what is Mac doing that linux (and don’t get me started on windows) are not? Linux and Mac are fundamentally OS cousin aren:t they?
The only real way you can compare this is by having exact identical hardware for both.
Also remember, Apple only have to build a kernel for a small subset of hardware. Therefore, if I compile a kernel for my system that only supports my specific hardware and nothing else, it will also boot quicker.
My Fedora 42 install boots up almost instantaneously from my NVMe drives with about 3K read/write speed. I expect if I built my own kernel for my own hardware I could get it to boot even quicker.
Since most Linux distros cater for a whole ton of hardware, then the kernel is bigger and thus is going to take longer to boot. Then also count the fact all the varying hardware installed, CPU speed, amount of RAM, disk speed, and then there are too many things causing this.
So can’t really be compared until they are built almost identical, hardware and software wise.
Thank you for explaining that mac only installs what it needs for specific hardware. A clear speed advantage. I find that OS weighs a tonne, but the kernel must be very well optimised for each machine. Apart from their desktop machines, the rest of their machines are designed for high battery autonomy / low power consumption and not about brute force speed, so I presume that the machines are highly tuned to give the speed. Thank you so much for your thoughts.
I used to use Gentoo Linux where everything is compiled. Therefore, if I use certain GCC optimisations for my particular CPU, I can also get speed increases when running that particular kernel or even apps that I will run on it. Thus booting a kernel optimised in this way will make it far quicker, than say taking the easy route in Gentoo and using genkernel - which would basically provide a kernel with a decent set of modules/kernel options enabled that you may or may not need. Also apps optimised too for that CPU will or should load quicker.
But yes, once you know you have a limited set of hardware to support, be it Macs with M4, M3, M2 processors, then you can obviously make your system boot very quick indeed because you are not building for hardware that you won’t use. Not also including the daily running and use of the OS.
There are probably other factors, but they will be some of the common ones.
I vaguely remember many years ago (15?) linux changed some part of the bootup process to increase speed. I can’t remember exactly what it was - I think it may have been something as simple as starting Xorg earlier in the boot process to give you the login screen - which only gave people a fake sense that everything had started already because not everything was truly initialized.
I don’t know anything about mac except my work (Oracle) forced me to have one and every 45 days or so I have to take it off the shelf, dust it off, boot it up, and touch the fingerprint reader to stay compliant. It does seem to boot up fast but then you get to wait around for it to update before you can use the thing.
The hardware detection being built into the kernel would make the most sense to me for explaining faster bootup. As a previous Gentoo user as well I can say once you have everything optimized you can really tell a difference. My preference for a more stable environment has me running Rocky 9 on my desktop and Fedora 42 on my laptop nowadays.
The newer MACs use ARM based CPU’s (m1, 2 & 3 etc.), not x86/64 based ones.Those CPU’s don’t come with all of the overhead the AMD/Intel CPU’s come with, required for backward compatibility. So they are more efficient. But those CPU’s aren’t compatible with lot of OS’s.