3 ms·
What people really want is sub-second booting, especially in embedded. It is a hard problem but somehow nobody seems interested in doing the hard CS research to
by amelius 2y ago
What people really want is sub-second booting, especially in embedded. It is a hard problem but somehow nobody seems interested in doing the hard CS research to solve it.
- rwmj 2y agoThere's tons of work on millisecond boot times going on, in kata-containers, confidential computing, and various "serverless" implementations. I wrote a paper about it nearly a decade ago too[1]. [1] http://git.annexia.org/?p=libguestfs-talks.git;a=tree;f=2016-eng-talk;hb=HEAD http://git.annexia.org/?p=libguestfs-talks.git;a=tree;f=2016...
- amelius 2y agoAnd I still can't boot my Linux system in a reasonable time. Perhaps the true problem that needs to be solved is that everybody is somehow (forced at) reinventing the wheel every time.
- bluGill 2y agoThe real problem is linux is just a kernel - they cannot force you to have good hardware. If you want fast boot you need to start with the hardware: a lot of hardware has an long init sequence so there is no way the kernel can boot fast as it cannot boot until that hardware is initialized. Then you can look at the kernel, step one is strip out all the drivers for that slow to init hardware you don't have (since those drivers have to insert waits into the boot while they check for the hardware you don't have). If you do this you can save a lot of boot time. Of course in the real world the people who select your hardware don't talk to the people who care about software. So you are stuck with slow boots just because it is too late to go back and do a fill million dollars each board re-spins now that we know our boot times are too slow. It gets worse, even if you select fast init hardware that doesn't mean it really is fast. I've seen hardware that claims to not need long inits, but if you don't insert waits in the boot there are bugs.
- amelius 2y agoWell, in many cases people __can__ get a kernel to have decent boot times if they pour sufficient time and energy into it.
- fwip 2y agoI haven't kept up with modern linux - is there a tool that automates that? e.g, records what drivers have been used over some number of boots, and then offers to disable all the drivers that haven't been used.
- nick__m 2y agosystemd-analyze record the boot time after the kernel is started but I don't know if there are equivalent for the kernel startup.
- augusto-moura 2y agoI don't think this is related to slow hardware, maybe bad drivers, but not slow hardware. I consistently get a faster boot both on Windows and on MacOS with reasonably slower specs than my Linux desktop. The linux boot is fast, some 5sec maximum. But Windows is almost instant, of course it uses the notorious fast startup, but even so I expected more from linux, being some lightweight as it is
- zokier 2y agoAt least on my completely unoptimized desktop, majority of boot time is already spent in UEFI firmware, not in kernel or userspace startup. So realistically there is limited opportunity to optimize the boot times.
- dataflow 2y ago> hard CS research I'm surprised to see this, in what way does it require hard CS research? Isn't it just debugging and implementation pain?
- amelius 2y agoI can only guess here. But remember that software package management was a pain too and it took someone to do a Ph.D. on the topic to give us NiX (and it still isn't perfect).
- dataflow 2y agoAh I see where you're coming from. I don't see any reason to expect that's the case here though. Package management has some fairly obvious tough CS problems inherent in it -- dependency resolution with version upgrades inherently feels NP-hard, for example. Whereas booting is about making hardware that initializes quickly and then making software that abstracts over a variety of hardware well... within the development budget you have. And then you're stuck with backward compatibility as everything changes. I could be wrong here but it feels like a costly engineering problem more than anything else. (Note I'm not saying you can't do a PhD in it and improve the situation -- you could probably do that for any problem, honestly. Just saying that I think you could get most of the way there by just paying the engineering cost.)
- amelius 2y agoI'm just seeing that this is a forever lingering problem and I think if only engineering costs were involved the problem would have been solved by now.
- akoboldfrying 2y agoDependency resolution with versions is indeed NP-hard, if versions "conflict" (2 versions of the same package can't be installed at the same time). What if they don't conflict, and you just wanna install the fewest possible package versions to satisfy all dependencies? That's NP-hard too.
- yencabulator 2y agoLinux boots to your application in 125 ms. There's no hard problem there, just bloat, general-purpose systems, and hardware not designed to boot fast.
- amelius 2y ago"Linux" is more than just the kernel. Pretending there is no problem is part of the problem.
- yencabulator 2y agoThat's not what I'm doing. I'm saying if your distro, your hardware, or your setup takes significantly more time, examine why. The hardware part is tough because we're effectively locked into whatever is cheap on the market, everything else is 100% fixable. Fast booting is not really a hard problem, especially in embedded where you know & control the hardware.
- amelius 2y agoYet, just about any system I've used boots slowly. Your argument is like saying that software bugs are not a real problem because you can simply find and fix them if you look hard enough.
- yencabulator 2y agoMy Framework laptop took 2.423s after starting userspace to be "done", without me making any effort on that. (Measurements for the part before that aren't useful on this setup because my initrd waits for user input passphrase.) It's simply not rocket science.
- amelius 2y ago2.423 seconds is on the fast end of what I've seen, congratulations. For most systems I've seen it would be at least 5 seconds and when comparing that to loading a webpage, I would consider closing the tab.
- vlowther 2y agoIt is not hard research, it is "just" a lot of plain old boring engineering.