4 ms·
This is a good question, and the "answer" avoid it by essentially saying "it can't be zero." Why does boot time take ~10 seconds? CPUs run in GHz, meaning 10^9
by air7 7y ago
This is a good question, and the "answer" avoid it by essentially saying "it can't be zero."
Why does boot time take ~10 seconds?
CPUs run in GHz, meaning 10^9 operations per second. That means that booting takes around 10^10 operations. Why that order of magnitude and not any other? Obvious answer is "that's where the optimization efforts stopped", but could it be 10^9 or 10^8?
Obviously booting time isn't just (or mostly) CPU, but the question extends to other peripherals: Harddrives access is in the 10^8 B/s range. RAM is 10^9 B/s. USB ~ 10^7 B/s. Wifi 10^6 B/s. etc. Why does booting, with all it's internal sub processes still take ~ 10^1 seconds and not any other OoM?
- Veedrac 7y ago10⁹ ops/s is an incredible underestimate; CPUs tend to have an IPC around 4, and at least two cores, even on mobile. Which means at 3GHz, you should have closer to 10¹¹ ops/s. The real question is not whether a computer can boot in a second, it's whether it can boot in a frame.
- fulafel 7y agoActual observed IPC tends to be 1 or less unless you are running well tuned computational workloads. And mostly software doesn't utilize multiple cores well.
- Veedrac 7y agoEven ‘perf stat libreoffice ./somedocument.odt’ give an IPC of almost 2, and that's hardly a well-tuned computational workload. > And mostly software doesn't utilize multiple cores well. Most software sucks, that's the point of this whole conversation.
- fulafel 7y agoValid correction, seems I was out of date, let's say 2 or below today. (I got 1.3-1.7 with a few libreoffice startup & command-line conversion experiments). However during the boot process I think the IPC will be notably less, because there will be periods of waiting for disk IO and hardware initialization waits. To zoom out, there are two dimensions here - it's good for software to run at a good IPC, but even better to do the job with fewer instructions.
- Veedrac 7y agoSure, I think the point of measuring CPU speed is not to say that it suffices for a fast boot, but to say that whatever it takes to boot, the CPU should not be a limiting factor. When I think of all the things necessary to booting; discovering connected devices, loading drivers, setting up memory and permissions, loading filesystem data, starting up the graphics hardware, ... I struggle to think of many things where ‘a few milliseconds’ is not plenty of time. For sure, you might have electrical limitations, spinning disks might take multiple milliseconds, and loading dozens of megabytes of data is not instantaneous, but, really, you've got 16 whole milliseconds in a frame at 60Hz! Is that so much to ask for?