Comment by StopDisinfo910
9 days ago
Systemd has more in common with launchd than SMF to be fair. SMF very much is a product of another time. Completely fine when we were dealing with workstations whose configuration was mostly static and not expected to change but very much unfit to the environment systemd operates nowadays.
Systemd uses a dependency graph by the way. There is little magic. Provided you have properly setup what depends on what, everything will boot just fine and it’s somehow resilient enough than even if you messed up somewhere there is a good chance it manages to bring everything up after some hiccups.
OTOH figuring things out at runtime seems to be how it paints itself into corners and just... stops. I'm not going to pretend that sysv was good, but when a sysv box booted, it came up, and when I told it to shut down, it died on the spot; there was none of this sitting staring at it twiddling its thumbs. On the bright side, these days things do eventually time out; I don't miss CentOS 7 freezing forever on shutdown.
Regarding "there is little magic", Poettering repeatedly praises socket activation in his blog. It's not a new idea, but an old one that fell out of favor because it kinda sucked (remember xinetd?). It's about pretending that a service is running when by providing its listening socket, then starting it when the first client connects.
It has some problems: it's more complicated, it can actually slow things down compared to starting a service as soon as possible, and it has new error cases because of course "pretending that a service is running" doesn't have exactly the same effect as actually having the service running.
Socket activation is entirely optional and is not what I would personally call "magic".
I don't think "pretending that a service is running" is a fair description of what it does however. It's just buffering. It has advantages in some case which is why it exists. It doesn't "kinda suck".
Entirely optional, but widely used. An advertised advantage is that service A that relies on B can start before or concurrently with B. Calling that "just buffering" is really not accurate.