The Grumpy Editor's guide to surviving the systemd debate
The Grumpy Editor's guide to surviving the systemd debate
Posted Nov 25, 2014 22:24 UTC (Tue) by nix (subscriber, #2304)In reply to: The Grumpy Editor's guide to surviving the systemd debate by Wol
Parent article: The Grumpy Editor's guide to surviving the systemd debate
Then there's the matter of actually writing the data. Step one is to write a transaction log entry. Step two, hash the key and append the record to the appropriate block. Step three, is the table overflowing, and if so expand it, logging that as you do so. Step four, close off the transaction log and commit.Oh yes they are. Non-corruption under conditions of power loss and -ENOSPC is routinely tested in any half-competent database system (hell, even sqlite. Perhaps especially sqlite, their test harness is awesome).Now how many opportunities are there in that database write for a screw-up to happen? That's even before you give the OS level and the disk subsystem the opportunity to screw things up for you! Even worse, step three presents a marvellous opportunity for trashing old log messages as the database block gets split into two. I don't know how other DB engines handle it, but they're not going to be any better at it!
Unfortunately these things slow everything down, quite a lot, and in the end you end up writing everything at least twice (once to a log of some kind, once to the DB) and taking noticeably more space to do it. I concur, writing syslogs to a database if you don't have a reason to do it (e.g. streaming structured logs there for later querying) is nuts.
But, then, existing projects like syslog-ng have been able to do this for many years. So this too isn't a justification for journald.
