[systemd-devel] Unbounded journal~ file accumulation

Moyer, Keith Keith.Moyer at netapp.com
Wed Nov 26 13:59:12 PST 2014


Running v215-6 via Debian jessie

In my situation, it is common to have unclean reboots.  On the subsequent boot, a system at ....journal~ file is created.  The problem is that these journal~ files do not trigger any cleanup with respect to SystemMaxUse.  If this occurs repeatedly, disk usage can go _way_ above SystemMaxUse.

Sending a SIGUSR2 to the systemd-journald process to force a rotation cleans them up, but without that (and assuming the active journal file doesn't get full and need to be rotated) there doesn't seem to be any limit on how much disk space the journal will use (I've had it go 10x SystemMaxUse - until the entire filesystem was full - according to du and journalctl --disk-usage).

I could add a service to my boot that issues the SIGUSR2, but the unnecessary _rotation_ would result in a journal file that only had the relatively small number of messages that cover part of a single bootup sequence (while still using 4M of disk space*).  My SystemMaxuse is pretty small (low tens of MiB), so that's a significant chunk wasted every boot.

Is there any way I can trigger the _cleanup_ (vacuum?) without triggering the rotation of the active log?  Is the behavior I'm seeing a bug that should be filed (should it already be doing that cleanup without me having to trigger it)?

* With my low SystemMaxUse, 4M is pretty large.  I see this minimum is hard-coded as JOURNAL_FILE_SIZE_MIN in the code.  Would I be inviting problems if I lowered this value to something like 512K? It was 64K until commit 253f59dff9.  Note: this query is secondary to the journal~ accumulation issue.

Thanks in advance.


More information about the systemd-devel mailing list