[systemd-devel] journal: How to limit the file size of runtime system.journal
Holger Winkelmann [TP]
hw at travelping.com
Sun Dec 15 23:31:46 PST 2013
Hi,
> > > Is there any particular reason? I think thresold for runtime journal
> > > size can lower much because in initramfs it's not supposed to have much
> > > logs.
> > First, there are some data strcutures which are allocated when the file
> > is created, and if the file was very small, relatively more space would
> > wasted. Second, repeated fields are not stored, just referenced, so things
> > become more efficient when the file is not too small. But neither is
> > fundamental reason, and with some tweaking the journal could be made
> > to work much smaller files.
>
> I understand. These are really good points when logs are relatively
> large, ie. the journal is stored on a real disk.
>
> However when it's in initramfs context, journal is stored in tmpfs which
> is using the real memory resource as it's backend. 4 MB seems a little
> bit overkill especially when memory is quite limited case, like kdump.
> To be more specific, I think 512 KB or 1 MB is a fairly large enough
> nubmer when journal is stored to a volatile backend.
We totally agree that a minimum size must be below 1MB either on flash or
ramfs for embedded devices. otherwise you end up with two solutions for smaller
and bigger devices. Is there any reference about the overhead if you use smaller
file size? Is there technical limitation for a minimum size?
Thanks,
Holger
> Thanks
> WANG Chao
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
--
Holger Winkelmann
More information about the systemd-devel
mailing list