Systemd journal getting very large on 18.04 - how to reduce?

Chris Green cl at isbd.net
Mon Aug 6 10:49:00 UTC 2018


On Sun, Aug 05, 2018 at 08:41:31PM +0000, Tom H wrote:
> On Sun, Aug 5, 2018 at 7:20 AM Chris Green <cl at isbd.net> wrote:
> > On Sun, Aug 05, 2018 at 01:16:25AM +0200, Oliver Grawert wrote:
> >> Am Samstag, den 04.08.2018, 20:38 +0100 schrieb Chris Green:
> >>>
> >>> I have an Ubuntu 18.04 system and I've just noticed that the
> >>> /var/log/journal directory is 4Gb, that's way too much.
> >>>
> >>> How is it supposed to be limited.
> >>
> >> typically logrtate should cover it and rotate and compress it regulary,
> >> if this does not happen then there is a bug you should report.
> >> (the switch to journald-only-by-default is new in 18.04, someone might
> >> have missed something)
> >
> > The journald.conf(5) man page tells me that the limit *is* 4Gb! That
> > seems crazy to me, who wants 4Gb of journal files?
> >
> > The rules (for 'real' disk based journal files) are:-
> >
> > Maximum of 10% of the file system where /var/log/journal is
> > Must leave at least 10% of file system free
> > Absolute maximum of 4Gb
> >
> > These might make sense where /var/log is on a relatively small
> > separate file system but I'm sure most Ubuntu users won't be in this
> > situation (like me) and thus one will always hit the 4Gb absolute
> > limit.
> >
> > It just doesn't sound sensible to me.
> 
> And, in a year, someone'll say that whatever value you consider
> sensible isn't sensible...
> 
Obviously! :-)  I still think a default 'absolute' limit of 4Gb is too
big.


> You can control journal files with "SystemMaxUse" "SystemKeepFree"
> "SystemMaxFileSize" "SystemMaxFiles" in journald.conf"..
> 
Yes, I know, but I prefer to keep my systems as standard as possible
if I can.

-- 
Chris Green



More information about the ubuntu-users mailing list