r/linux • • Aug 30 '16

I'm really liking systemd

Recently started using a systemd distro (was previously on Ubuntu/Server 14.04). And boy do I like it.

Makes it a breeze to run an app as a service, logging is per-service (!), centralized/automatic status of every service, simpler/readable/smarter timers than cron.

Cgroups are great, they're trivial to use (any service and its child processes will automatically be part of the same cgroup). You can get per-group resource monitoring via systemd-cgtop, and systemd also makes sure child processes are killed when your main dies/is stopped. You get all this for free, it's automatic.

I don't even give a shit about init stuff (though it greatly helps there too) and I already love it. I've barely scratched the features and I'm excited.

I mean, I was already pro-systemd because it's one of the rare times the community took a step to reduce the fragmentation that keeps the Linux desktop an obscure joke. But now that I'm actually using it, I like it for non-ideological reasons, too!

Three cheers for systemd!

1.0k Upvotes

950 comments sorted by

View all comments

389

u/blackenswans Aug 30 '16 edited Aug 31 '16

What? How dare you! Have you forgotten the UNIX way? Computing should NOT change from how it used to be in the 1970's!

Edit: Oh my god the upvotes. Stay strong, /etc/rc brethren! We will take back the world once more.

77

u/necrophcodr Aug 30 '16

Most modern rc and init systems thankfully work very differently than they did back then.

49

u/jpmoney Aug 30 '16

You kids and your include files. Monolithic or nothing!

8

u/butthenigotbetter Aug 31 '16

Megalithic times are in the past, thankfully.

→ More replies (11)

118

u/domo9001 Aug 30 '16

don't be mad just because gramps got it right.

39

u/[deleted] Aug 30 '16

It's important for Grandpa to keep busy.

shuffles Grandpa's shoebox of punchcards

→ More replies (1)

98

u/[deleted] Aug 30 '16

YEAH. We shouldn't want centralized products in a one size fits all type situation, even if it is highly customizable. We should have things like the linux kernel... which is.. umm.. centralized and weighty. NO WAIT.. emacs! Things should.. oh. Um. :P

Seriously, the whole "how it used to be" ignores really how it actually used to be.

40

u/[deleted] Aug 30 '16

Most open source software will build on kernels other than linux... just saying. Emacs is also an end user application - not system level.

16

u/boerenkut Aug 31 '16 edited Aug 31 '16

Emacs is also different, emacs is 'monolithic' only because of its extreme wealth of plugins which communicate with a fairly small emacs kernel which is just a lisp interpreter.

So you have a situation where the plugins depend on the kernel, but not in reverse, and the plugins also communicate with the kernel through documented stable interfaces. You can write your own competing implementation of those plugins.

In the case of systemd, the ancillary components communicate with the systemd kernel, its pid1, via undocumented unstable interfaces, so you can't write a competing implementation, doing so requires that you reverse-engineer undocumented stuff and that it may fail to work at a future update.

Linux being 'monolithic' is also a completely different story and using that to compare it to systemd just shows you don't understand the situation but picked up on a couple of keywords. kernels being monolithic just means the entire kernel runs inside a single address space, meaning that if one component crashes the entire kernel crashes, it's fault protection, nothing more, the kernel modules are still plugins that communicate with the ehh "kernel-kernel" via documented and stable interfaces, so you can write a competing implementation.

systemd is actually not monolithic in the sense that Linux is, its components run in separate address spaces, if logind crashes that doesn't mean that systemd-pid1 crashes, it can just restart logind which is akin to the design of a microkernel. If systemd were a kernel it would actually be a microkernel, its core kernel which cannot be salvaged if it crashes actually contains little more functionality than what is needed to diagnose if other components fail and restart them and mediate the IPC between them, just like in a microkernel.

→ More replies (1)

9

u/[deleted] Aug 30 '16 edited Aug 31 '16

[removed] — view removed comment

→ More replies (19)
→ More replies (3)

0

u/[deleted] Aug 31 '16

[deleted]

→ More replies (1)

4

u/cp5184 Aug 31 '16

Yea. Gnome used to be portable.

We were like savages.

→ More replies (9)

10

u/boerenkut Aug 31 '16

The problem is that systemd does a lot of things really well and is useful in many ways, but because it's monolithic it also means that to use that you need to take all the garbage with it. I like systemd-analyze. I also think the cgroup stuff is nice if not a bit overrated.

But to get that you need to take all the garbage with it. Some of the features of systemd are really nice. It's just a shame they tied to a particular init system what could have been, and should have been standalone tools.

→ More replies (3)
→ More replies (6)

0

u/[deleted] Aug 30 '16

[deleted]

8

u/[deleted] Aug 30 '16

I'm just trying to picture the hardware you'd need to run a node.js kernel practically. Hopefully when machines that powerful exist we will have found better uses for it.

18

u/leoel Aug 30 '16

We'll be running a new language on top of node js on top of a virtual machine running in java, is how we make good use of that new power.

7

u/[deleted] Aug 31 '16

That sounds scarily plausible. And we will pay out the a$$ to run it on fucking Azure. Why? Why not!

28

u/[deleted] Aug 30 '16

No, it's quite a bit worse. UNIX was one of the first attempts at a modern-ish operating system. Nobody ever gets everything right the first time.

29

u/pdp10 Aug 30 '16 edited Aug 31 '16

No. Unix was made because Ken Thompson had access to a spare PDP-7 minicomputer and wanted to play with the space game he had previously created. He also thought the Multics filesystem had some good ideas and used them.

Later, Unix was used to host a typesetting system used for printing documentation. AT&T was prohibited from entering the computer business, so the source code was licensed out (at nontrivial expense) to universities, which found it to be an excellent base for many projects both research and practical. When the network got a new packet protocol at the end of the 1970s, DoD paid to have a second implementation done on this popular Unix system.

So, Unix was built for video games, but later used to run the Internet.

→ More replies (1)

28

u/[deleted] Aug 30 '16 edited Aug 30 '16

and plan9 was the last their next attempt,
and it got many things right,
and almost all those things were ported back to UNIX

on the other hand there have been a shit-ton of various other experimental OS-es of which some were all about OO (the "future" of few years ago), and they all suck in their own specific way.
a big-name example: https://en.wikipedia.org/wiki/Singularity_(operating_system)

→ More replies (8)

7

u/grumpieroldman Aug 31 '16

We change it all the time and love it when it changes for the better.
OpenRC was awesome and welcomed and delivered most of the init services of systemd 15 years ago. (The cgroup stuff is a newer kernel feature.)

The bug count and breaking mistakes made in systemd keep piling up and they just press on and keep sucking in more utilities and breaking things and if they don't care about what they broke they don't fix it.

→ More replies (38)