LWN.net Logo

Poettering: The Biggest Myths

Poettering: The Biggest Myths

Posted Jan 27, 2013 12:11 UTC (Sun) by lkundrak (subscriber, #43452)
In reply to: Poettering: The Biggest Myths by hazard
Parent article: Poettering: The Biggest Myths

1) systemd is a solution for a problem that doesn't exist for me.
Be very thankful you're not me then!
root@megalodon# service postgresql start
Starting postgresql service: [  OK  ]
root@megalodon# su postgres -c "psql -c 'select 1;'"
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
For a good explanation how systemd solved problems that bothered me for years please refer to my posting above. Also, argument that most issues probably could have been solved by hacking the shell init scripts is indeed valid (some couldn't, like reliable shutdown via freezer which needs init system assistance at service startup time). Problem is that it would have been rather complex for certain problems, way more than can be legibly expressed in a shell script and leading to fragile and slow solutions (I'm pretty sure, I've seen too many of those).
2) Entire SysV based boot can be understood on the spot by reading the code of the scripts. Compared to this, systemd is a black box, to fully understand its internals you have to go outside the command line: hunt for the docs on the Web, download the source code.
Which system do you use, out of curiosity? I just tried to understand what could go wrong during a failed openldap startup by peeking at /etc/rc.d/init.d/slapd and found out that it seems to be a startup script for a nuclear power plant instead of a directory service.
3) systemd makes the boot process non-linear and complex to comprehend and predict. I cannot easily see the boot process visually as it is happening and I have to rely on external utilities to understand the order in which everything will be started. With systemd, I get a feeling that I'm booting Windows - I don't have a feeling that I'm in control anymore.
This is probably the same issue as (5): the learning curve. Speaking purely for myself, it does not take a lot of time to get comfortable with the utilities and the utilities are superb in cause something starts in an incorrect order (due to a missing dependency or something). Also, due to lazy activation it doesn't happen very frequently that things mess up.
4) systemd is more difficult to troubleshoot. Starting a SysV script, I get output and errors straightaway on the screen. With systemd, at best this information is hidden somewhere in the logs which I have to hunt for.
This is not true, maybe it improved significantly since you've tried systemd? Systemd now catches stderr output and you can easily inspect it with systemctl status when things fail, without fear that it will scroll away from your screen. This pleased me very much when I found out about it :)
5) systemd has a steep learning curve. There are lots of config files and interaction between them is not obvious. It'll be quite difficult to explain it to a junior system administrator.
It's probably easier to get a junior administrator write a robust and correct service file than write a robust and correct sysvinit script. He may probably not understand the inner working of the init system, but most juniors probably never peek at /etc/rc* either. Moreover, most juniors probably are not terribly curious about kernel internals, yet kernel delivers satisfactory "just works" experience to them. If systemd could do the same (it does for me!) it would probably be fine.


(Log in to post comments)

Poettering: The Biggest Myths

Posted Jan 28, 2013 17:31 UTC (Mon) by malor (subscriber, #2973) [Link]

It's probably easier to get a junior administrator write a robust and correct service file than write a robust and correct sysvinit script.

I haven't experimented yet with systemd, so I'm speaking from 50% ignorance, but sysvinit scripts are not simple things. We think of them as simple because we've invested the very large amount of time it takes to learn them well enough to write them properly. I think many of us have forgotten how hard that system was, back when we all started.

There is a lot to know to write a startup script from scratch. Even after all these years, I usually copy other scripts and adapt them, rather than writing them from whole cloth, because there's so much to get exactly correct. From the examples in this thread, at least, it looks like systemd would be much easier. The major downside is that admins may not understand their systems as well, as more is being abstracted away, but that's been true of every abstraction that's ever been invented. Part of OS evolution is moving further and further from the bare metal, and I don't think that process is likely to stop anytime soon.

The question is: are systemd's abstractions good ones? It seems like most folks think that they are.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds