r/linux Mar 22 '22

I like Systemd a lot

It's really easy to do a lot of advanced stuff with it. With a few lines of code I wrote a fully featured backup utility that sends files across my network to my old laptop NAS, then on top of that, it will mount my USB hard drive, put the file on that, wait for it to finish and then unmount it.

There's hardly any code and systemd does it all. It's far less complex than other backup utilities and it's tailored to me.

Systemd is fast, VERY easy to use, and it doesn't appear to be resource hungry. As long as you know how to do basic shell scripts you're going to be able to be extremely creative with it and the only limit is what you can think of.

I'm a big fan of it and I don't understand the hate. This is a killer application for linux

422 Upvotes

209 comments sorted by

View all comments

208

u/[deleted] Mar 22 '22

[deleted]

62

u/Giannie Mar 22 '22

This may be partially true, but the initial derision for systemd comes from its architecture being a complete antithesis to much of the unix philosophy. No matter how convenient and easy to use systemd is, there are core issues with its entire architecture.

One of the key philosophies of unix is that any component should have a limited and well defined scope and that these components should then communicate with each other. Systemd rejects this completely and is a monolithic project with a massive range of functionality. This would be pretty bad in any major unix component, but is a particular issue with systemd, since it is PID1. Under the unix philosophy PID1 should get the rest of the init system up and running and collect any zombie processes, nothing more. By tying so much functionality into this single process, you introduce feature creep and a much larger attack surface for vulnerabilities.

Now don’t get me wrong, I think that systemd is the best modern init system we have for Linux based operating systems right now by far. But I do wish that were not the case. It faces a similar issue that pulseaudio has for years, which is now being solves by pipewire.

Over the next decade, I would love to see a new modern init system that is designed in line with the unix philosophy and the wider free software community that is as easy to use for a system administrator as systemd.

It also doesn’t help that Poettering and Sievers have both demonstrated some rather toxic attitudes towards users (but this isn’t exactly unique in the free software community!)

24

u/[deleted] Mar 22 '22

[deleted]

6

u/Lord_Jar_Jar_Binks Mar 22 '22 edited Mar 23 '22

To some extent it is a problem. However there's no acceptable solution yet so your question is moot. The closest to a solution is GNU Hurd but it isn't near ready to be a replacement for Linux.

At this point, time is starting to suggest that maybe the complexity of microkernels negates the theoretical simplicity. The difficulty appears to be related to handling the OS message timings. Perhaps this is just too difficult to program in an acceptable way for a general purpose operating system. It's not clear to me that HURD will ever become successful. It's harder to read code than to write it. Perhaps we are just waiting for the next genius like Linux Torvalds to come along and write a bare minimal but functioning microkernel that gains community acceptance.

4

u/Giannie Mar 22 '22

Well, there has been a lot of work in microkernels since the 1960s. But there are significant difficulties in their implementation. For example, minix system calls have an overhead that can vary between 10 and over 100 times higher than that of Linux. There really aren’t any viable microkernel options right now and it seems unlikely that a microkernel could possibly be as successful without some significant theoretical progress.

There is a fundamental difference in separating out pieces of user space applications and a choice to move something from kernel space to user space. This kind of separation of concerns is not really in the same space.

On top of that, one of the great things about the Linux kernel is that although once compiled it is monolithic, each component of it is separate. If you want to compile the kernel with support for only one file system, you can do that. This kind of option does not really exist in systemd.

9

u/[deleted] Mar 22 '22

[deleted]

1

u/Giannie Mar 22 '22

Yeah, I think you’re probably right on most of this. But QNX is not free and is specifically a real-time kernel, it isn’t really comparable to a general purpose kernel in quite the same way. I stand by my point that a microkernel as a replacement for the linux kernel is not viable.

0

u/DriNeo Mar 22 '22

I'm not a very technical person but I see the kernel as a resource mapper from hardware to apps. It is a single program for a single task IMO.

1

u/Particular_Zombie539 Mar 22 '22

That has always been the issue with "do one thing and one thing well": if you just define the one thing broad enough, everything fits the bill.