Hacker News new | ask | show | jobs
by Polylactic_acid 2197 days ago
Does anyone know why x86 systems are so slow to start up? I got a x570 mobo recently and it still takes about 5 seconds to get to grub.
9 comments

Before grub you might have POST and possibly an intentional delay to allow for user input to enter EFI configuation.
Yes, most of the bios programs have the setting of "POST Boot Delay", which intentionally waits a couple of seconds to give user to interact with the bios, e.g. entering settings page or to allow user to change the boot drive.
It's performing various hardware tests before showing you the BIOS screen. And even then, it usually pauses the BIOS screen for about a second to give the user enough time to hit F12 or ESC if they want to change any settings. You could probably disable both of those if you really wanted to.
I've seen server boards wait like 30 seconds before going into BIOS. Consumer PCs care less about waiting for PSUs and VRMs to warm up but could be a reason why it's not superfast.
I've seen wildly varying start up times on x86 hardware. I had an Samsung Ativ Book 9+ running stock Debian that with a cold start had fully started X and showed the login prompt before the backlight turned on (about 1 second). I've also had the "pleasure" to manage some Dell servers that took an impressive 2 minutes just to get past the BIOS.

(Well I did turn off the 5 second delay in GRUB to make that laptop boot time possible.)

The reason it varies wildly is that the hardware and possible settings supported varies wildly on a DIY PC. A few things I noticed a few years ago while troubleshooting slow POST:

- Having a HDD connected to the additional SATA ports provided by an onboard controller (not the chipset) incurred a delay because the controller was initialized later (slower?), the HDD would power up later, and the POST sequence wouldn't finish until the HDD finished spinning up. Checking SMART on boot just made it worse.

- Switching between the 2 GPUs I had available at the time (one Nvidia, one AMD) consistently made a couple of seconds of difference.

- Using XMP made POST much slower too (don't remember by how much).

- Updating the FW on my SSD shaved a bit of time.

- Devices connected to USB during post also increased POST time.

And as a side note, my cheaper, simpler mobos would always POST faster. Gaming/OC mobos these days are loaded and it all adds up to what the PC has to do to initialize in POST.

Bottom line is it's easier to optimize for short POST when your config is locked in place (like a phone) then on a machine that could have any number of possible permutations of hardware and settings. Today that's x86.

> some Dell servers that took an impressive 2 minutes just to get past the BIOS.

I'm pretty sure I've seen worse, but in fairness you can only check 1T of RAM so fast:) (These were monster database servers.)

memory controller training takes fraction of a second
Not on some amd board. It's a common complain, my previous board would have a pre-bios delay of 5 to 10 second with xmp enable and still up to 5 without xmp. I changed board and it's now a lot better, but still slower than intel.

ps: xmp is probably an intel only name, but i cant remember the amd one.

DOCP for Asus, and one of the others has EOCP. I think it's a licensing thing where they don't want to pay for XMP.
It seems to be a lot of scanning of external busses.

If I toss a SATA optical drive on, it definitely slows things down.

I suspect a single NVMe drive and only keyboard and mouse plugged in would boot faster.

<joke>

Perhaps it's because minix in the Management Engine has to boot before the BIOS can run so you can take it over remotely? OS bootup usually takes a while.

</joke>

I know this was meant in jest, but isn't that part of the system always "hot" as long as there is power, seeing as the entire point is to provide remote management capability?
memory training is slow. on x570 you should have a debug code indicator, follow the codes there to get an impression where the time is spent.
I wonder how much time is spent on getting the processor from 16-bit Real Mode and up to the full 64-bit mode.
A few tens of microseconds, most likely.
It is interesting how even people in this industry are sometimes orders of magnitude off when thinking about how quickly a modern computer is able to do something. Personally, I think it is because web development has trained people to believe that computers are slow.
Just switching is a few tens of instructions. Tens of microseconds should be more than enough to also build a non-trivial page table.