29 points · by lelf · 7y ago · 20 comments
In my opinion, for the security and stability of most systems, initd is superior. Lennart Poettering has a long history of ignoring blatant security problems, and SystemD itself has a long history of containing system-breaking bugs, and in general being over-engineered for most use-cases.
See: https://suckless.org/sucks/systemd/ and http://without-systemd.org/wiki/index.php/Arguments_against_... and http://without-systemd.org/wiki/index.php/List_of_articles_c...
EDIT:
There's really nothing here I can say that hasn't been talked about elsewhere. What I will say is that, elsewhere on hacker news, people seem to be preoccupied with "Language Safety", and Rust, and the adjacent languages that provide that. The reason for this is to reduce bugs and potential exploits.
You know what else causes less bugs? LESS CODE, AND LESS FEATURES. The less code there is running on a system, the less code there is to exploit, and the less bugs there are likely to be. PID 1 is a SACRED, HOLY, Process Identifier. Code that runs with this PID has control over the ENTIRE SYSTEM. An exploit in PID 1 is LITERALLY game over.
Let us not forget: https://www.theregister.co.uk/2017/07/28/black_hat_pwnie_awa... (Links to bug reports are halfway down the page)
That's an odd point to make in defense of systemd, since one of the primary objections to its use on servers is that it has vastly more surface area than is required for process supervision.
I have the opposite opinion. systemd is irrelevant on a server (might've been relevant once upon a time, but not in this day and age), and it was developed specifically with end-user devices in mind.
Looking at the list of things systemd does (pulled from http://without-systemd.org/wiki/index.php/Arguments_against_... ):
systemd is an init system
In this day and age of virtual machines and containers, this is not really that useful. Most daemons are effectively PID 1 in their respective containers (if there is a separate init, it ain't really doing much besides launching a finger-countable number of daemons), and on the host (assuming you even can access the host) it's still stripped down to the bare minimum (with anything not required for managing VMs delegated to VMs instead of running directly on the hypervisor). As the article mentioned, the startup speed benefits from launching daemons in parallel are hardly useful compared to the long POST times and the limited number of daemons.In contrast, desktops (niche systems like Qubes notwithstanding) do frequently run a lot of daemons on a single logical system. Fast startup does matter for desktops. systemd is actually useful here.
systemd provides an UEFI boot loader, systemd-boot (previously gummiboot)
Not really sure this is useful anywhere (ain't like there aren't plenty of existing bootloaders). systemd provides a login manager, systemd-logind
Given - again - the growing trend toward virtualizing/containerizing everything, this is decreasingly valuable on a server except maybe for SSH logins (and even then). This is more useful for desktops, where login and session management matters a lot more. systemd provides a syslog daemon, systemd-journald
Most servers shouldn't be using the vast majority of journald's functionality; they should instead be sending logs to a remote log server (if your servers aren't already doing so, then I suggest getting off Hacker News and fixing that ASAP :) ).Desktops, on the other hand, typically stick to local logging and thus do potentially benefit from an improved local logging system (whether journald counts as "improved" is a matter of taste).
systemd provides a mount front-end, systemd-mount
[ ... ]
systemd provides automount via systemd.automount to substitute autofs
This one happens to be useful for both servers and desktops, but in my experience frequent live unmounting/remounting of disks is way more common for desktops than servers (with the sole exception of servers hooked up to, say, an optical media carousel or something like that, and even that's a pretty niche application). RAID wouldn't even be a factor here, since swapping out a disk in an array doesn't involve mounting or unmounting the filesystem(s) on top of that array. The udev sources were merged into the systemd source tree.
Benefits servers and desktops more-or-less equally. systemd provides systemd.timer timer units, which can be used to replace cron and at
One of the few cases of a systemd feature that's more useful on servers than desktops (though in both cases I've yet to see this actually used instead of cron/at). systemd provides a D-Bus client library, sd-bus (see sd-bus)
systemd developed an in-kernel D-Bus implementation, kdbus.
D-Bus literally stands for "Desktop Bus". These are explicitly desktop-oriented features. systemd provides a caching DNS resolver, systemd-resolved
This is entirely useless on a server; either your server is a DNS server (in which case it's using an actual DNS-serving daemon meant for handling external traffic, i.e. not systemd-resolved) or it's not a DNS server (in which case - unless you're an extreme masochist and consider DNS-cache-related issues to be fun - you're probably going to be pointing /etc/resolv.conf at your network's actual DNS servers and calling it a day).This is way more useful for laptops and mobile devices, which switch networks frequently (and sometimes switch onto e.g. public hotspots or other networks with buggy or overworked or outright adversarial DNS servers of their own).
systemd provides a network manager and DHCP client, systemd-networkd
systemd provides a HTTP server for journal events, systemd-journal-gatewayd
systemd provides a containerization system systemd-nspawn
Not sure if I've ever seen these three actually used anywhere; they seem to be equally useless on servers and desktops.----
Final verdict given the above: systemd was demonstrably developed specifically with desktops in mind (and even more specifically with GNOME in mind, which should be unsurprising given how much Red Hat loves GNOME). The vast majority of its components make far more sense on end-user devices than servers (and the ones that don't are either equally useful or equally useless).
Par for the course as regards reportage on systemd, in other words.
It's weird: People are so het up on hating systemd it's like they forgot to give any truly coherent reasons why we should hate systemd. They just assume everyone does, and launch into the rant on that basis. It reminds me of people thinking disco is terrible and so much worse than any other kind of dance music, or that Nickleback is utterly inexcusable as opposed to being a somewhat mediocre rock band, or the endless stream of hatred for Modern architecture and Modern art. Once you remove the constant blaring hatred, there's just nothing there.
There are solid reasons for disliking systemd.
I can appreciate a good systemd HCI argument. Maybe a Unix philosophy argument, but those are pretty debunked these days. I can appreciate an attack surface/system responsibility argument. But this article delves into obnoxious tropes, biases, rants against systemd, and doesn't present anything that's thought provoking.
I'd say so, yeah. Unless you think boot time does matter on a server, in which case I'd ask why.
There's certainly a case to be made about running the project in a more community-friendly manner, but systemd is mature and pretty much everywhere now, so it's hard to argue what the benefits might've been.