Live data from Hacker News

Running systemd without systemd-journald

declassed.art

41–50 of 79 posts

Re: Running systemd without systemd-journald

#41

Earlier quoted context omitted.

Do you have an example of when systemd is not used for good?

it kills production daemons having long running stateful data whenever the netdev goes offline., systemd-networkd, that is.

Only if you configure it to do that. You can use Wants= and After= for your service to start it after the network, but not restart otherwise.

The behaviour you describe is not unreasonable to want: If your network device goes away, what exactly are you binding the socket to? How are you restoring the listening when it comes back up? But it's up to you to say which one you want.

Re: Running systemd without systemd-journald

#42

I have but one word for this guy. Devuan I see no reason not to consider it. He is a Debian user who hates the way systemd works. Devuan is for you.

if you run a Debian-based production server, then Devuan is for you. Devuan can allow your precious daemon to stay up despite netdev going offline, unlike systemd-networkd which would kill the daemon. This is quite important if your large ling-running daemon has statefulness data.

As someone pointed out elsewhere in the thread, so can systemd, your service did what it was configured to do. If you want the service to stay up when netdev goes down, then don't tell systemd that netdev is a hard requirement for your service.

Re: Running systemd without systemd-journald

#43

Earlier quoted context omitted.

I don't know if this is still an issue but the last time I used journald the logs would occasionally become corrupted and journalctl would refuse to read them. The fix was to just delete the logs. I have no idea how logging got so screwed up that corruption in part of the file could make the rest of the log file unreadable. I mean, it's a journal, it's right in the name. Ever since then I switched to rsyslogd and the…

Keep in mind that rsyslog doesn't even attempt to verify logs. An alternative explanation is: my system is corrupting logs, I changed to a logging daemon which doesn't tell me about it. I mean, there could definitely be a bug in journald, but I haven't seen any fixes mentioned in changelog for the last 5 years and if it was happening in standard usage, people would notice. For recovering corrupted logs - you can stil…

IIRC when I experienced this the logs were all in some binary format that couldn't easily be less'd. tbh I didn't do much investigation other than to see the "delete all your logs" resolution suggestion. There could have been a better option.

Re: Running systemd without systemd-journald

#44

Earlier quoted context omitted.

>You can run quite a lot in 512MB of RAM if you use the right languages to write code in. I recently delivered a production-ready embedded system running Armbian with 512megs RAM, and indeed disabled systemd-journald for our uses, also .. but even with it enabled, our Lua-based app was (science/data analysis on sensor network) running in the best environment it has ever run, so I can confirm: 512MB is enough for a lo…

Windows 95 ran an entire OS with decent UI in 8 MB of RAM. One really has to wonder, where is all the RAM going these days? I think the knowledge of doing anything with only 8 MB of RAM has gone away, we don't know how to do it anymore.

Your comment brings the following Monty Python sketch to mind:

“What did the Romans ever do for us?

… All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health”

Replace “Romans” with “Increased RAM usage”.

Re: Running systemd without systemd-journald

#45
post #19
post #14

Would doing something like this work around the "journald drops the most important error messages" issue that has been known/outstanding for ten years (bug moved to GitHub six years ago), or is that more of a fundamental design mistake in systemd itself? https://github.com/systemd/systemd/issues/2913 https://bugs.freedesktop.org/show_bug.cgi?id=50184

It's not accurate to say it "drops" error messages. The bug causes these messages to not be attributed to a particular unit - you can still see them with `journalctl` but not with `journalctl -u foo`. Still pretty annoying and should absolutely be fixed (although I'm not sure if systemd is the right place to do it).

> although I'm not sure if systemd is the right place to do it

It's truly impressive how systemd turns out the be the right place to do absolutely anything and everything from bootloader to init to dhcp to ntp to network shares... except fix systemd bugs. systemd doesn't seem to be the right place to do that ever. Someone else needs to do it. For another example of this phenomenon, see the nohup bug.

Re: Running systemd without systemd-journald

#46
post #12

Weird; the systemd journal is the feature I want most! It would be the last thing I would ever consider disabling.

I don't know if this is still an issue but the last time I used journald the logs would occasionally become corrupted and journalctl would refuse to read them. The fix was to just delete the logs. I have no idea how logging got so screwed up that corruption in part of the file could make the rest of the log file unreadable. I mean, it's a journal, it's right in the name. Ever since then I switched to rsyslogd and the…

Honestly, that sounds more like a disk problem than a systemd problem.

Re: Running systemd without systemd-journald

#47

Earlier quoted context omitted.

I don't know if this is still an issue but the last time I used journald the logs would occasionally become corrupted and journalctl would refuse to read them. The fix was to just delete the logs. I have no idea how logging got so screwed up that corruption in part of the file could make the rest of the log file unreadable. I mean, it's a journal, it's right in the name. Ever since then I switched to rsyslogd and the…

Keep in mind that rsyslog doesn't even attempt to verify logs. An alternative explanation is: my system is corrupting logs, I changed to a logging daemon which doesn't tell me about it. I mean, there could definitely be a bug in journald, but I haven't seen any fixes mentioned in changelog for the last 5 years and if it was happening in standard usage, people would notice. For recovering corrupted logs - you can stil…

The fact that it can't seem to recover from a few bad records and gives up on the whole file demonstrates what terrible software it is.

Re: Running systemd without systemd-journald

#48
post #47

Earlier quoted context omitted.

Keep in mind that rsyslog doesn't even attempt to verify logs. An alternative explanation is: my system is corrupting logs, I changed to a logging daemon which doesn't tell me about it. I mean, there could definitely be a bug in journald, but I haven't seen any fixes mentioned in changelog for the last 5 years and if it was happening in standard usage, people would notice. For recovering corrupted logs - you can stil…

The fact that it can't seem to recover from a few bad records and gives up on the whole file demonstrates what terrible software it is.

Have you tried it? Journalctl does skip bad entries and prints out the rest automatically. If you've found a case where it doesn't, you should report that as a bug.

Re: Running systemd without systemd-journald

#49
post #40

Earlier quoted context omitted.

Windows 95 ran an entire OS with decent UI in 8 MB of RAM. One really has to wonder, where is all the RAM going these days? I think the knowledge of doing anything with only 8 MB of RAM has gone away, we don't know how to do it anymore.

It's not the knowledge - it's the increased complexity of the entire stack, all the way down to the hardware. A modern linux kernel image is easily bigger than 8MB, and that needs to be in memory at all times. Why? Because of all the functionality it has these days, to fit all the possible usecases people need. Windows 95 didn't have Swap, didn't support many filesystems, didn't have central logging, didn't have ASLR…

> Windows 95 didn't have Swap

it did have virtual Memory and swap

Post reply on HN