Monitoring system resources using top or htop on an Ubuntu desktop or cloud instance only to discover systemd-journald consuming 80% to 100% of a CPU core degrades performance, causes cooling fans to spin at maximum speed, and exhausts battery reserves. In this state, terminal responsiveness slows and overall system performance suffers.
The systemd-journald service collects and stores system logging data. Excessive CPU consumption almost always signals a runaway background service trapped in an infinite crash loop flooding the journal socket with thousands of log entries per second, corrupted binary journal databases, or unrestricted log size quotas. Here is how to diagnose and resolve this CPU spike.
Identify Runaway Services Flooding the System Journal
In almost all cases, systemd-journald consumes high CPU not because of internal engine bugs, but because another application or kernel driver is hammering the logging pipeline continuously.
- Open a terminal and stream incoming system logs in real time:
sudo journalctl -f - Observe the console output. If lines scroll past uncontrollably with rapid repetition, identify the specific process name, daemon, or hardware device generating the flood (common culprits include misconfigured audio daemons, failing network adapters, or crashing snap containers).
- Press Ctrl + C to exit the stream.
- Query the top log contributors across recent boots:
sudo journalctl -xb | awk '{print $5}' | sort | uniq -c | sort -nr | head -n 10 - Once the offending service is identified, stop or reconfigure it cleanly (e.g.,
sudo systemctl stop <servicename>).
Vacuum and Purge Corrupted Journal Logs
Over time, binary journal log files can accumulate index errors, forcing systemd-journald to expend excessive CPU cycles attempting to parse fragmented log volumes.
- Verify the current disk space consumed by systemd journals:
journalctl --disk-usage - Vacuum historical archives, retaining only recent logs:
sudo journalctl --vacuum-size=100M - Alternatively, vacuum logs by time retention:
sudo journalctl --vacuum-time=3d - Rotate the active journal files to commit clean binary headers:
sudo systemctl kill --kill-who=main --signal=SIGUSR2 systemd-journald.service
Configure Strict Log Limits in journald.conf
Restricting maximum memory usage and disk allocation prevents journald from consuming unbounded processor and memory caches.
- Open the journal configuration file in a terminal text editor:
sudo nano /etc/systemd/journald.conf - Locate the
[Journal]section and uncomment or add the following directives:SystemMaxUse=200MSystemMaxFileSize=50MRateLimitIntervalSec=30sRateLimitBurst=10000 - Setting rate limits instructs
systemd-journaldto drop excessive log bursts automatically, protecting CPU availability during runaway daemon crashes. - Save changes by pressing Ctrl + O and exit via Ctrl + X.
- Restart the journal daemon to apply the new configuration:
sudo systemctl restart systemd-journald - Run
topto confirm that CPU utilization settles back to normal levels below 1%.