Comment by csdvrx

Comment by csdvrx 18 hours ago

11 replies

> it's like systemd trading off non-determinism for boot speed, when it takes 5 minutes to get through the POST

That's a bad analogy: if a given deterministic service ordering is needed for a service to correctly start (say because it doesn't start with the systemd unit), it means the non-deterministic systemd service units are not properly encoding the dependencies tree in the Before= and After=

When done properly, both solutions should work the same. However, the solution properly encoding the dependency graph (instead of just projecting it on a 1-dimensional sequence of numbers) will be more flexible: it's the better solution, because it will give you more speed but also more flexibility: you can see the branches any leaf depends on, remove leaves as needed, then cull the useless branches. You could add determinism if you want, but why bother?

It's like using the dependencies of linux packages, and leaving the job of resolving them to package managers (apt, pacman...): you can then remove the useless packages which are no longer required.

Compare that to doing a `make install` of everything to /usr/local in a specific order, as specified by a script: when done properly, both solutions will work, but one solution is clearly better than the other as it encodes more finely the existing dependencies instead of projecting them to a sequence.

You can add determinism if you want to follow a sequence (ex: `apt-get install make` before adding gcc, then add cuda...), or you can use meta package like build-essentials, but being restricted to a sequence gains you nothing.

blibble 18 hours ago

I don't think it is a bad analogy

given how complicated the boot process is ([1]), and it occurs once a month, I'd rather it was as deterministic as possible

vs. shaving 1% off the boot time

[1]: distros continue to ship subtlety broken unit files, because the model is too complicated

  • Aurornis 18 hours ago

    Most systems do not have 5 minute POST times. That’s an extreme outlier.

    Linux runs all over, including embedded systems where boot time is important.

    Optimizing for edge cases on outliers isn’t a priority. If you need specific boot ordering, configure it that way. It doesn’t make sense for the entire Linux world to sacrifice boot speed.

    • timcobb 17 hours ago

      I don't even think my Pentium 166 took 5 minutes to POST. Did computers ever take that long to POST??

      • yjftsjthsd-h 16 hours ago

        Old machines probably didn't, no, but I have absolutely seen machines (Enterprise™ Servers) that took longer than that to get to the bootloader. IIRC it was mostly a combination of hardware RAID controllers and RAM... something. Testing?

      • BobbyTables2 17 hours ago

        Look at enterprise servers.

        Competing POST in under 2 minutes is not guaranteed.

        Especially the 4 socket beasts with lots of DIMMs.

      • Twirrim 15 hours ago

        Physical servers do. It's always astounding to me how long it takes to initialise all that hardware.

  • kcexn 16 hours ago

    Oh? What's an example of a common way for unit files to be subtlely broken?