On Thu, 2 May 2013 06:26, Jan Engelhardt <jengelh@...> wrote:
On Wednesday 2013-05-01 20:52, Claudio Freire wrote: [snip]
particular order. If there's a crash, or a power outage, you don't know which pages have been written and which haven't. Postgres and most reasonably reliable databases you mention will have a WAL to make sure pages are written in the right order, and no torn pages appear. The WAL is a file opened in sync I/O mode. It's slow, but safe.[...] with memory mapped I/O, you have no way to force a specific write order.
You can have order with mmap. In fact, OpenLDAP developer Howard Chu presented the inner workings of a new MDB backend last year at LinuxCon Europe. mdb is all about mmap and uses COW with 2 snapshots {current,previous} at any time,[1,2] ensuring reliability whilst keeping speed.
[1] www.openldap.org/pub/hyc/mdm-paper.pdf [2] www.openldap.org/pub/hyc/mdm-slides.pdf
Thanks for the links, but keep one thing in mind: In LDAP there are much more reads than writes. Syslogs are mostly writes ans little reads. That, coupled with the need of reliable crash recovery, makes mmap and consorts much less suited for the use in logging esp. Syslog. Personally I deem the binary format of systemd-journal for one of the biggest dips in the toilet since the start of Unix, even json would be a big improvement. Maybe the package systemd-logger should not made available until the jounal has gotten a complete overhaul. Looking at the code, there are big ideas, but then the ball was dropped, fast and deep. mmap makes sense for readonly (e.g. libs), or read mostly (e.g. webserver, ldap), with a msync after a write, but for a log? - Just no. And the binary format does not help any, checksums can be added to text formats, and what sense does the added cryptography make? Someone has taken hot fecal matter and used a rotating device to distribute. Back to the subject: "What is the purpose of the systemd journal service?" Answer: Forwarder for external or on-system real syslog service. - Yamaban, who bemoans the lost ours for looking at the code. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org