Rate limiting journald to save your SSD
Software running on your system may be buggy, causing the journal to be spammed with log entries. I found out the hard way when the baloo file indexer entered a crash loop and caused over 5GB of log writes per hour.
Journald has deletes old logs and prevents log files from consuming too much disk space. However, I am using ZFS and make hourly snapshots. This means that even deleted log files are kept and suddenly my desktop was consuming 120 gigabytes of additional disk space per day.
Even if disk space is not an issue, 5GB of writes per hour adds up to 44TB per year. Not great considering limited SSD write endurance.
To prevent this from happening, edit /etc/systemd/journald.conf
and set RateLimitIntervalSec
and RateLimitBurst
in the [Journal]
section. I set mine to 1m
and 1000
respectively, meaning 1000 log entries are allowed to be written every minute.
Finally, restart journald: systemctl restart systemd-journald