[systemd-devel] [ANNOUNCE] Journal File Format Documentation

Ciprian Dorin Craciun ciprian.craciun at gmail.com
Tue Oct 23 05:25:56 PDT 2012


On Sun, Oct 21, 2012 at 1:05 AM, Lennart Poettering
<lennart at poettering.net> wrote:
> Heya,
>
> I have now found the time to document the journal file format:
>
> http://www.freedesktop.org/wiki/Software/systemd/journal-files
>
> Comments welcome!
>
> (Oh, and it's in the fdo wiki, so if you see a typo or so, go ahead and
> fix it!)


    I've quickly read through the document [1] pointed above
describing the log on disk format. (I've read it out of curiosity, not
with the intention to implement it. Maybe to "steal" some ideas for
the future.) :)
    (Just as an observation I've also read your essay about this
subject [2], and I agree with most of it.)

    But what I couldn't find in any of these documents (maybe there is
in another one), is a justification of the current technical (i.e.
implementation) decisions. Mainly:

    Why did you resort to implementing a new database format, and
didn't choose an existing embedded library like BerkeleyDB, LevelDB,
etc.? (Advantages / disadvantages?)

    Just to be clear I don't mean the decision of a completely new
logging format (i.e. not compatible with syslog, CEE, etc.) I'm
focusing just on the storage engine.

    For example I could think of:
    * not relaying on an external embedded storage library, makes the
resulting binaries smaller and simpler; (this doesn't seem to be it as
systemd already incorporates some other libraries;)
    * having a custom log implementation makes this job more
efficient; (in the long term I don't think beating a library like the
ones listed above is feasible without a lot of work;)
    * log rotation is almost impossible with some of the above cited
libraries; (there are other tricks that can be done to achieve such;)

    Please don't take this as critique of the journal work (I've read
some of those too, especially from Rainer, but I'm neutral so far). I
just want to understand the decisions.

    Ciprian.


    [1] http://www.freedesktop.org/wiki/Software/systemd/journal-files
    [2] https://docs.google.com/document/pub?id=1IC9yOXj7j6cdLLxWEBAGRL6wl97tFxgjLUEHIX3MSTs&pli=1


More information about the systemd-devel mailing list