by 3princip · 10y ago · 0 comments
I don't understand why systemd is taking over or what benefit it has bought. It works for now, is that enough?
It feels like a monstrosity of overly complex and questionable design. Yet, it spreads. Throwing "unix philosophy", a most agreeable set of ideas, out the window.
Maybe I'm just being reactionary and slow to adapt.
First, please, let's get the unix philosophy crap out of the way. Most of the modern Linux tools don't follow it. The people who passionately hate on systemd for not following the unix philosophy happily use Grub2, LibreOffice and whatnot. The Unix philosophy is nice to have, but quality software that does not follow it exists, nonetheless.
The advantages that systemd has brought are hard to downplay. It gets a lot of hate because they're essentially non-existent for desktop users (and don't give me that shit about dynamically mounting storage devices or parallel startup and whatever, because those were available way, way before systemd was a thing). The unpleasant truth is that desktop Linux is largely irrelevant for a lot of the major players in the Linux world, and for the very few who care about it, the only relevant target is corporate workstations, where a tight integration with systemd is desirable.
tl;dr it has real advantages which are desirable to most of the companies that pour money into Linux stuff and, unsurprisingly, these can dictate much of Linux development at the moment.
So, what is the advantage systemd provides to companies?
- It offers a single, easily-configurable way to define startup tasks, issue various system-level commands (shutdown, suspend etc.), which is immensely helpful when you write a daemon that has to write on a dozen different targets. The official story is that SysV was nice and easy because it was just a shell script and we loved that. Truth is, writing startup scripts was a heart-wrenching adventure in figuring out the subtle differences between distributions. Systemd's solution is not better, IMHO, but it is certainly far, far easier...
* ...which is a big deal when, now that Linux is suddenly the next big thing (especially in make-belief markets like IoT), you have to suddenly convert swarms of Android and Windows programmers to Linux programmers. Especially on platforms where there's a lot of integration and packing work to do (which often gets outsourced to someplace where programmers are cheap and super-specialized), this is useful, because it's a lot easier to teach people to write systemd service files than it is to teach them to write shell scripts.
* Having a unified system for virtually every system-level task reduces the surface on which your customers can exercise their creativity, which reduces support costs.
* For companies that write Linux software, as opposed to "just" integrating it, having a standardized system for virtually every system-level task means that, as long as you stick to using that interface, your software is going to run on whatever distribution or platform you deploy it on. Historically, this was problematic on Linux, as every distro did its subtly different thing and, consequently, you had to test on every distro.
Edit: just to be clear -- these are all good things. My beef with systemd is related to its community's attitude towards reliability and bugs, the abysmal documentation that surrounds not just systemd, but its entire entourage (like D-Bus), its developers' lack of concern for anything that is not systemd or Gnome and runs on something other than their laptops, and the aggressive PR around it, the result of which is that a) now there's a bunch of systemd bigots who keep trying to push it into everything, even where it doesn't belongs, and b) there's another bunch of anti-systemd bigots who insist it's the doom but won't code a damn line to give us something else, and I have to keep explaining why systemd is OK sometimes.
Not one or two, all of them. Writing an initscript started with copying the template from /etc/skel, and it was already pretty long. Compare that with the actual init scripts from FreeBSD/OpenBSD. Some are literally 3 lines long.
My issue with systemd is that there is no clearly defined scope. It started as a "SysV init replacement", which it clearly isn't. SysV is an init system, while systemd is more of a service manager that can also run as a system's init. When comparing the two, or even systemd vs {upstart, nosh, you name it} what are we even trying to compare ? systemd does init, service restart, tracks user's process and sessions, manages your network (systemd-network), your logs (systemd-journald), your devices (systemd-udevd), how your system syncs time (systemd-timesyncd) and I'll stop here because the list is long. IMO, it does too many things and it appears the various components are rather tightly coupled.
Others have mentioned the code quality; I can't comment because I haven't looked at the code. One thing that really bothers me though, is the tight coupling with dbus. It doesn't matter how good the systemd-* code is, if dbus is borked then your whole system goes down with it. I can debug a misbehaving init script by starting it with sh -x. With dbus, it's a nightmare.
Any good recommendations re: Linux distros that follow the Unix philosophy closely whilst still being up to date in terms of packages?
For server maybe you can give OpenBSD a spin for its fame of security.