Hacker News new | ask | show | jobs
by nubinetwork 17 days ago
This looks cool, I like this... but if I read the screenshot correctly, it took them 12 seconds from initrd to fully loaded. Maybe this would make sense there, but my laptop boots so fast, those 12 seconds are like two seconds. It would take longer to render the screen than it would just spraying its usual text to the VT.

(Honestly, it spends more time in uefi preboot than it does to actually boot the system.)

4 comments

This is an ongoing pet peeve of mine, how the UEFI of a completely solderd laptop board can take longer than the OS to initialize a fully-known set of components.
It's not really UEFI issue, but what modules were loaded, how it was configured/wired up - and sometimes it ends up serializing on slow boot of some components (like DDR5 memory), and weird crappy add-ons from manufacturer.
yeah,

DDR5 training is a huge (UX) issues wrt. boot times (mainly on desktop systems).

sure only "once" if your system is correctly setup, but I have seen too many cases of buggy motherboards not properly handling this

and the biggest issue is the transparency, i.e. you don't see that it does DDR5 "training"/"parameter self adaption". It looks like it's "just stuck" in early EFI.

I was unprepared for how long training would take on my Framework laptop kit with 64 GB of DDR5, and actually thought there was something wrong with it.

Nope, training just took minutes, with nothing but a black screen.

Similar with my new NUC which also used DDR5. I genuinely thought there was something wrong, powered it off and reseated RAM and such. Kept debugging it for about 30 minutes before I searched and found out it might be training. Left it alone and sure enough after about 15 minutes the display started showing stuff.
I returned a motherboard because I thought it was DOA because it wouldn't boot but in the end it was just training for 96GB. It took around 10 minutes of black screen before I saw anything.
Me too. 128gb of ram and just a light on for several minutes. I only saw it boot because I left the second motherboard in the state while I went off to burn a new bios thumb drive.
I wasn't aware of DD5 training being expected to take that long often. That would explain why the box that is my current home-lab taking so long to boot when I first put it together (and on one other occasion) but behaving normally every other time. Every day is a school day!
A bit of a problem is that unless you add a PowerVM style boot, it's going to be hard adding indicators in today's "absolutely no status LEDs" world
On many machines with DDR5 you get the lengthy memory training every boot and that comes on top of the already long UEFI initialization time.
Surely that could run in parallel with initializing everything else, with the amount of CPU cache modern CPUs have?

Also the soldered ram couldn't have changed from last boot, so reuse the last training? That's exactly what I mean.

The memory training happens before UEFI is initialized proper, though it provides a minimal framework for handling such parts - it's mainly so that every bit of very early code can properly pass information later on.

As for reusing the training, that's what normally happens, but there are various things that can trigger retraining beyond swapping anything in memory modules, and it's perfectly possible the vendor somehow managed to write an add-on that triggers that on every boot (just like intel managed to wreck NVRAM on every netboot, for example)

The training reuse is already happening on machines with regular user-replaceable DIMM modules. It's why there is such a scary long wait on the first boot of a newly-assembled system, but not subsequent ones.

So even if it can change, starting out with a simple "Are the same modules still installed?" check saves a lot of time.

> training every boot

except this should only happen _once_ (until you remove/replace components, reset the BIOS etc.). Which is why it normally doesn't happen for laptops, it was run once in the factory and DDR being soldered one mean they can just "fixed" disable the retraining avoiding bugs in the "retraining needed" detection

but yes, there are pretty bad motherboards out there, like the one I have turned out to be a complete shit show with multiple sever design issues I unluckily "lucked out of not running into" in the first 2 years of usage making a return unlikely and a replacement is useless as this is are fundamental issue affecting all models AFIK.

That's a taken from the demo `sample-vm-slow-services`, which is intentionally slow to show off all the features.
Their point is that it's kind of useless in a real-world environment because the window when this stuff is happening is too short to parse any of this info.
To me it looks like something you don't need until you suddenly do and it's too late to go install it while you're staring at a hung boot screen wondering what on earth it's doing.

  > it took them 12 seconds from initrd to fully loaded
Looks like they intentionally slow it down. Look at service names

  > my laptop boots so fast, those 12 seconds are like two seconds
From cold boot or warm? Fwiw my desktop warm boots fast enough that I don't see anything. Cold boots in about 5s and I guarantee I have more devices to mount than your laptop does.

If you want fast boots with systemd you usually have to do a little tuning (nothing serious unless you want to go sub 2s cold boot). Some things could probably be automated but it is understandable why they are not. For example, do you wait for a disk to mount, how many retries, how long before timeout, or do you lazy load? In a laptop it's easier to make a decision. But if you don't know if the machine is a laptop, a desktop, or a server, then what is the best default choice? I'd agree that the safe choice is best

> but my laptop boots so fast, those 12 seconds are like two seconds

Though if it suddenly starts taking a lot longer, perhaps this sort of display could help in finding a clue as to why?

There's really only 2 things that could happen there for me... either networking doesn't come up so nfs mount hangs, or I borked the gpu driver and wayland doesn't start.