← All benchmarksLinux

journald disk usage: 47.7 MB to 16.0 MB after rotate and vacuum

How do I limit journald disk usage?

After writing 200,000 log lines, journalctl --disk-usage reported 47.7 MB; journalctl --rotate then --vacuum-size=20M reduced it to 16.0 MB. A permanent cap is SystemMaxUse in a journald.conf drop-in.

Results

after 200k lines47.7 MB
after rotate + vacuum 20M16.0 MB

How it was measured

systemd-cat flood, then rotate and vacuum.

[Journal]
SystemMaxUse=200M
MaxRetentionSec=14day

Why

journald enforces caps when rotating.

When this does not apply

Defaults differ by distribution.

Environment

GitHub-hosted Ubuntu 24.04 runner (2 vCPU, ~8 GB RAM), systemd 255. Measured 2026-10-12.

Source: linux-lab/03-journald-cap.sh in my content-engine repository. Treat any single run as a direction; re-run it on your hardware.

By Josué Barros, senior software engineer (full-stack, data and AI).