10 systemd-journald Config Hacks to Cut Log I/O and Speed Up Your Linux Server
In this article, tune systemd-journald with journald.conf drop-ins on Linux to cap log size, cut disk syncs, and rate-limit noisy services.
β Ravi Saive
An application that writes thousands of log lines per minute can make systemd-journald fill your disk, trigger constant disk syncs, and bury real errors under noise. Here's how to tune journald.conf drop-ins, per-service limits, and journal namespaces so logging stays fast and lean.
If you have ever logged into a busy server and found that /var/log/journal was using 4 GB of disk space, or noticed systemd-journald near the top of iotop while an application was writing debug messages nonstop, you already know that logging has a real cost.
Every line a service prints has to be received, indexed, written to disk, and later rotated, and on a server with a slow disk or an SD card, that work adds up quickly.
Most sysadmins deal with this by deleting old journal files by hand or restarting the application that writes too many logs, but neither of these fixes the cause, so the same problem comes back a week later.
A better approach is to tell systemd-journald how much log data to keep, how often to write it to disk, and which messages are worth storing at all.
All of this is controlled through journald.conf settings, which are documented in man 5 journald.conf, along with a few per-service options described in man 5 systemd.exec.
We will go through 10 practical changes, and each one is small enough to apply on a production server during a normal maintenance window.