News for hackers. Stuff that matters.
Re:Linux distros without systemd by markstos on Monday May 20, 2019 @10:29AM (#19960638)
I read everything I could find on systemd to form my own opinion. I used FreeBSD for a decade and have many years of Ubuntu/upstart experience after that.

Based on my experience and all the anti-systemd posts online, I expected to dislike it.

But on it's merits I really like the consistency it brings to the "system layer" of the OS.

I find it's shame when developers skip over systemd for consideration, adding extra layers of complexity when systemd alone would have been sufficient: For example, using Docker when the basic isolation features of systemd would do, or using "forever.js" to manage Node.js processes, when systemd could could be saving 15% memory overhead per process, using software already installed in the base system.

On the other hand, I do support diversity of software and am glad to see some other options still being promoted and used. The dangers and weaknesses of monoculture in the physical world apply to software systems as well.

Re:Linux distros without systemd by jimktrains2 on Monday May 20, 2019 @10:59AM (#19961004)
One of my biggest issues with systemd is that I don't like the idea of not being able to replace pieces of it. If I don't like their logging, dns, or ntp daemons, I can't easily replace them without feeling like a second-class citizen and/or having the overhead you've mentioned.

From my understanding, alternatives _could_ be written, but haven't yet and that means we currently having to ignore more battle-hardened software in favour of whatever is in systemd by default.

Re:Linux distros without systemd by PlutoIsAPlanet on Monday May 20, 2019 @11:05AM (#19961074)
The ntp and dns are easy to replace, they're not part of the actual systemd binary. Fedora from what I remember, doesn't even enable systemds ntp service on Workstation.

Logging is a bit different, but you can tell journald to use syslog.

Re:Linux distros without systemd by JdeBP on Monday May 20, 2019 @12:35PM (#19962165)
> you can tell journald to use syslog

No. One can tell syslogd to read from the journal. There is no mode of operation for journald that does not have the journal, on disc or in a memory filesystem. And journald itself is not optional. The only optional part is choosing to have an extra old-style syslog daemon that is using the journal as input.

* https://unix.stackexchange.com/a/294206/5132

* https://unix.stackexchange.com/a/332315/5132

Re:Linux distros without systemd by __david__ on Monday May 20, 2019 @06:51PM (#19966068)
> The ntp and dns are easy to replace, they're not part of the actual systemd binary.

They really aren't. It took us a full week of work to get dnsmasq to work in place of systemd-resolved. The problem is that they are tied in to the dhcp client and it only seems to know how to update systemd-resolved's configuration. So getting our custom search path out of dhcp was a huge pain.

I like almost every other part of systemd, but trying to excise systemd-resolved from Ubuntu 18.04 was massively frustrating to the point where I started thinking, "maybe the systemd haters are right…"

Re:Linux distros without systemd by jimktrains2 on Monday May 20, 2019 @11:37AM (#19961488)
I don't mean in terms of the binary, but in terms of the whole system.
Re:Linux distros without systemd by vetinari on Monday May 20, 2019 @12:21PM (#19962006)
You would have to write quite a bit of code...

The success of systemd is in that it solves problems for distros that none other was solving (or even looking other way). If you want to successfully replace it, you have to solve the same problems, and do it better, so it would be worth replacing systemd.

And because none other was doing it, you would have to write solution that does that. Slapping some bash scripts together won't do it.

Re:Linux distros without systemd by michaelmrose on Monday May 20, 2019 @01:56PM (#19963095)
It's a very strange argument that I have seen previously that someone could write an alternative to systemd but haven't ergo systemd must be the best alternative.

This is wholly and totally imaginary. Every part of system has an alternative because it is all solving existing problems that people have been solving for decades with a variety of tools.

The only actual challenge is replacing just part of systemd while retailing compatibility with the rest of it.

Re:Linux distros without systemd by vetinari on Monday May 20, 2019 @02:22PM (#19963413)
> This is wholly and totally imaginary. Every part of system has an alternative because it is all solving existing problems that people have been solving for decades with a variety of tools.

Alternative doesn't mean 100% substitute both ways. The pre-systemd didn't go in their abstraction in the way, that systemd does - it is basically system-level, event handling machine. The events could be not only boot, but also hotplug, timer, socket connection or others, and their handling is configured by the system or admin in unified way, including unified way of adjusting system-supplied units. Other inits just ran scripts at some order the boot and that's it, ignoring, that something doesn't have to happen at boot, but at some other time.

That's one of the things, that systemd handles way better, than any suggested alternative. By ignoring where systemd is strong, you won't make the alternatives any better.

> The only actual challenge is replacing just part of systemd while retailing compatibility with the rest of it.

No. I don't see why we should have the Sisyphos task of maintaing sysv/cron/etc idiosyncrasies forever. Sometimes, it is better to get rid of the collected warts, and not limit the system to existing semantics.

Re:Linux distros without systemd by JdeBP on Monday May 20, 2019 @08:44PM (#19966700)
> The pre-systemd didn't go in their abstraction

On the contrary, that's exactly what systemd's predecessor, Upstart, did. systemd, in contrast, did not. Basing the system around the concept of events triggering things turned out to cause problems, as discussed by Lennart Poettering and by Debian Technical Committee members during the Debian Hoo-Hah as their reason for not choosing Upstart.

Re:Linux distros without systemd by vetinari on Tuesday May 21, 2019 @05:49AM (#19968755)
The problem wasn't that Upstart was event-based, but HOW the event system was designed.

See http://0pointer.de/blog/projects/systemd.html, section "On Upstart". It names two big issues with HOW.

Re:Linux distros without systemd by jimktrains2 on Monday May 20, 2019 @02:58PM (#19963787)
I didn't mean that everything was in a single binary, but that everything is tightly coupled. Just because a binary is replaceable, doesn't mean the replacements that have existed for decades will be "drop in" or integrate as well, which leads to feeling like a second class citizen or the overhead originally mentioned.
Re:Linux distros without systemd by vetinari on Monday May 20, 2019 @05:31PM (#19965439)
I didn't mean single binary either.

I meant, that systemd solves some category of problems, that other tools didn't solve, didn't intend to solve and didn't even care for what the problems are. For distribution maintainers, systemd was something to welcome, that did address their problems.

So yes, there is no replacement (the requirement for it being drop-in only places the bar higher), because there's nothing else that scratches the same itch.

Re:Linux distros without systemd by boramalper on Monday May 20, 2019 @10:38AM (#19960731)
> For example, using Docker when the basic isolation features of systemd would do

This is an interesting claim, mind throwing some pointers?

Re:Linux distros without systemd by progval on Monday May 20, 2019 @10:43AM (#19960785)
https://www.freedesktop.org/software/systemd/man/systemd.exe...

and some other directives documented on the same page.

Re:Linux distros without systemd by Operyl on Monday May 20, 2019 @10:56AM (#19960953)
I had completely forgotten about these directives! It's things like this that make me glad systemd is a choice, honestly.
Re:Linux distros without systemd by dijit on Monday May 20, 2019 @05:42PM (#19965556)
SystemD did not invent cgroups. Not only is it possible to use cgroups without systemd it is often easier for small cases and binaries can call cgroups themselves for any child processes they create.

The timing of these systems releasing does not equate to causation here. Google themselves (creators of cgroups) do not even use systemd on their own hypervisors which leverage cgroups heavily.

Re:Linux distros without systemd by Operyl on Monday May 20, 2019 @05:51PM (#19965644)
Nobody said they did. You’re putting words in my mouth. The ease of use with 2-3 directives in a way that just works is what they brought to the table.
Re:Linux distros without systemd by dijit on Monday May 20, 2019 @07:17PM (#19966245)
boramalper 8 hours ago | parent | flag | favorite | on: Linux distros without systemd

> For example, using Docker when the basic isolation features of systemd would do

Re:Linux distros without systemd by JohnFen on Monday May 20, 2019 @11:52AM (#19961673)
> On the other hand, I do support diversity of software and am glad to see some other options still being promoted and used.

Then you should not be wanting to see applications including a hard dependency to systemD.

Re:Linux distros without systemd by eropple on Monday May 20, 2019 @12:38PM (#19962198)
Why is it another open source developer's obligation to satisfy your design desires? Are you paying them? If not, put your time where you aren't putting your money, become the purveyor of diversity, and submit a patch. Fork, if necessary and it matters to you that much--it's your right to do so.
Re:Linux distros without systemd by camgunz on Monday May 20, 2019 @02:29PM (#19963493)
Full disclosure: I'm a systemd skeptic.

The problem is basically that Linux used to be about choice (choose your distro! choose your DE! choose your shell! choose your browser!) but now that it's become big business, large corporations like Red Hat (developer of systemd) have transformed the evolution of Linux from a bottom-up consensus system to a top-down "we develop all the stuff you use and now it all uses our stuff so now you do too" approach. It's _very_ hard for me to build a system without systemd; I can use a niche Linux distro, I can use a BSD, or I can hack another init system (etc.) in myself. None of those are satisfying, I think for obvious reasons.

systemd is not well written, and it is not well designed. Its style and architecture are inconsistent. Parsing is mixed with validation and business logic. The types of CVEs its generated show that there was no coherent thought put into input validation, fuzzing, taint analysis, and so on. The effects of those flaws (your whole system crashes, etc.) show that failure strategies were never considered. And if all that sounds like overkill to you, maybe it is! But I can tell you that these techniques and design strategies are employed by experts to build software that must be robust, like software that controls medical equipment or transportation control systems. We know how to build software that works and that mitigates failures. Looking at systemd's code, it's clear they used none of that knowledge. And that, combined with its sprawling control over my system, makes me not want it on my machines.

Re:Linux distros without systemd by eropple on Monday May 20, 2019 @03:18PM (#19963976)
I am not a systemd skeptic, but I'm also not somebody who cares that much. (Which might seem at odds with this thread, but I'm in a lot of meetings today. ;) I use it and it gets out of my way. For me, it's fine.

I'm not qualified to judge the quality of the code in systemd directly; I've browsed it a little but I am a middling C++ programmer and while it hasn't stood out to me as smelly I would defer to more knowledgeable heads. I get the drive for very rugged underpinnings, and I'm on board with that; in things that aren't C++ I frequently am the one with the scalpels making criticisms similar to yours, so that totally resonates with me. I am not, however, convinced that any of the alternatives that currently exist are materially better, so I kinda shrug a bit? Further, it seems to me that the generally modular nature of systemd (regardless of how coupled one believes those separate modules to be) suggests that a determined programmer could probably build a drop-in replacement--Rust? Where's my Rust Evangelization Strike Force?--that plays nicely with it and grows to replace poor and soft design.

The social aspect you bring up is, to me, the most compelling argument against systemd (because monocultures aren't great in general, etc.--I think most people agree on that). Thing is, though, I think that that bottom-up consensus model was doomed from the start. I don't think it was ever going to be tenable as soon as there's any money in it. Red Hat wants consistency, their stuff is going to have consistency, you can use it or go off-roading.

I don't think there's a great solution aside from "build your own ecosystem and don't let it get capitalism.txt'd to death." Which is a deeply unsatisfying and impractical answer. And to be clear, people who feel strongly about it should do that. I'm not being snarky when I say that. I'm a pragmatist--if it's better, I'll use it, too, and submit patches if needed and when I'm capable. ;)

Re:Linux distros without systemd by camgunz on Monday May 20, 2019 @04:11PM (#19964625)
> I don't think there's a great solution aside from "build your own ecosystem and don't let it get capitalism.txt'd to death."

I do, it's "if you run a big mainstream distro like Fedora or Debian, let your users swap out init systems". I know there have been debates on this, and I know the general consensus is "it's not worth the trouble / it's not as simple as just swapping out something like systemd". My counter arguments are: there are distros that are doing it, so it doesn't seem like it's that bad after all, and when dealing with something as important as PID 1 (or your libc, or your filesystem) we should be conservative and let users swap things back when making a huge change.

Re:Linux distros without systemd by eropple on Monday May 20, 2019 @04:20PM (#19964736)
To that I'd just go "sure!", but I'm just a guy. The first thing that jumps out to me, though, is the question of who pays for the doing of it and the testing of it? From what I know (and I've been learning a lot today, it's been productive!), it seems like you're likely to undertake a Devuan level of effort to do it with Debian, and your patchset is going to be so broad as to effectively fork the core anyway. Is there value, then, in tagging along with that major distro? What do you get, then, if you're the second-class citizen? I'm reminded of stuff like Kubuntu, which (and I say this as a long-time KDE fan) has historically limped along with only moderate love--and that's a DE, it's a lot easier to handle DE differences than core init differences, service management differences, etc. (We have the XDG standards and the like, after all. Though I guess, in a certain light, systemd's trying to be XDG-for-the-core, which attacks the question we're looking at directly, yeah?)

The other thing that jumps out at me is just that this hypothetical is mostly kicking the can down the road. If Fedora suddenly decided to support multiple init systems I think it's hard to envision a future where the happy path wouldn't remain systemd; it's what the core folks think is best, otherwise they wouldn't use it now, and even with additional support the lion's share of attention would go to that happy path. To that end I think that any sort of init choice in those distros just becomes "so we'll support it for now, but the set of third party stuff that supports it is going to continue to shrink, so I hope you have an off-ramp in the future."

Between these two issues it seems like separate distros that have a firm commitment to not-systemd end up being necessary anyway and an ecosystem of not-systemd stuff will need to compete for value on those merits. What am I missing?

Re:Linux distros without systemd by JohnFen on Monday May 20, 2019 @01:37PM (#19962858)
> Why is it another open source developer's obligation to satisfy your design desires?

I never said it is.

What I said is that if someone values diversity of software, then they should object to applications including a hard dependency on systemD. That's just logical, as including hard dependencies on systemD reduces software diversity by requiring that the system it runs on uses systemD rather than allowing them the choice.

Re:Linux distros without systemd by silversconfused on Monday May 20, 2019 @01:38PM (#19962870)
We did fork debian, and here are a TON of people who say they do not care, but still insist that we are doing it wrong for some reason.
Re:Linux distros without systemd by fabiomaia on Monday May 20, 2019 @10:47AM (#19960840)
Interesting. So what use cases is Docker good for? Why is it so popular if systemd suffices?
Re:Linux distros without systemd by ajross on Monday May 20, 2019 @12:20PM (#19961996)
Docker is about deployment. The isolation model is built on the same tooling that systemd uses, but the usage model is all about how to come up with an easily isolated runtime environment that can be published and extended in a big development community.

Basically systemd has nothing like a dockerfile, that's not what it's for.

I think there's a good argument though that Docker should be retargetting its encapsulation work to a lower level OS primitive where possible (which would be systemd on linux) instead of rolling its own.

Re:Linux distros without systemd by tracker1 on Monday May 20, 2019 @01:26PM (#19962735)
See podman[1]

[1] https://podman.io/

Re:Linux distros without systemd by eropple on Monday May 20, 2019 @11:53AM (#19961694)
Docker provides some more approachable tooling on top and (IMO, at least) its networking is more straightforward for "developer-y" use cases.

I quite like systemd-nspawn too, though.

Re:Linux distros without systemd by addicted on Monday May 20, 2019 @11:57AM (#19961739)
Cross platform stuff? Docker allows you to do many things on Windows and Linux.

I’m not arguing that this is worth the overhead, or even a useful feature in practice (most companies and products tend to pick one environment and stick to it), but one that comes to mind that systemd would likely never have.

Re:Linux distros without systemd by tracker1 on Monday May 20, 2019 @01:29PM (#19962773)
The cross-platform stuff is interesting... however, in practice almost everything outside Linux containers is only weakly supported. You have to jump through some hoops to use alpha/nightly builds of Docker hand installed in Windows 2019 or later Win10 builds in order to support both Linux and Windows containers on a single system. I think the work with WSL2 may make things better better as a result.

The naming in Windows and Mac, along with the limitations of the Desktop implementation are also frustrating. Don't get me wrong, I really like Docker as an orchestration base, I just don't think the cross-platform support is a value add in practice and in fact detracts as a whole imho.

Re:Linux distros without systemd by tarruda on Monday May 20, 2019 @11:40AM (#19961529)
I'm not sure systemd had every container feature available when docker was released. If I'm not mistaken, systemd-nspawn (systemd alternative to docker) is much more recent.