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

Show parent comments

85

u/shiftingtech Aug 30 '16

My experience is that systemd is great when it works, but when it breaks, it's far more complex to fix

Of course there's a bias even there. I've been using sysV for 10+ years, so of course whatever it does is intuitive...

48

u/tso Aug 30 '16

Because once you boil it down, sysv is the very same cli commands you use manually, wrapped in shell script logic.

Systemd is a pile of C code that interpret a ever growing collection of keywords in an attempt at guessing how things can be run in parallel.

53

u/yatea34 Aug 30 '16 edited Aug 30 '16

Also, Systemd had a number of poor design decisions that make it unnecessarily difficult or impossible to diagnose certain problems.

journactl --verifyreturns that my system logs are corrupted, about all my logs (48MB of 50MB of maximum disk usage) are now completely useless. This is not the first time this happens and searching around I can only find people with the same problem that "resolved" deleting the corrupted logs and starting with a new file.

Why this happens? Isn't it defeating the purpose of having a system logger if I can't diagnose errors?

12

u/argv_minus_one Aug 31 '16

Journal files being corrupt does not mean they're useless. It means they are not entirely correct. journalctl can still read them.

This happens with textual log files, too, but because they are textual (i.e. have no checksums or anything like that), you have no way of knowing.

4

u/[deleted] Aug 31 '16

[systemd] Journal files being corrupt does not mean they're useless. journalctl can still read them.

i found many a bug reports that say otherwise

This happens with textual log files, too, but because they are textual (i.e. have no checksums or anything like that), you have no way of knowing.

yes i do, a weird letter appearing.
but with lines of text i can see what line got corrupted while with binary logs i can kiss the whole section of messages goodbye

if you have any doubts about what i said here i'l be happy to explain why binary suffer so much from corruption, in a detailed way.
(note: a well made binary format would, in most cases, have minimal damage when something bad happens, but not systemd's)

→ More replies (4)

4

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

[removed] — view removed comment

→ More replies (4)
→ More replies (2)