Skip to content
ENExplore Calculators

Journalctl Disk Usage Calculator

Calculate systemd journal disk usage against SystemMaxUse and runtime journal limits.

About Journalctl Disk Usage Calculator

journald continuously trims its own storage to stay within the SystemMaxUse ceiling configured in journald.conf, rotating out the oldest entries first once that cap is reached — regardless of how long an administrator might want logs retained. This means the actual disk usage is the smaller of the desired usage (log generation rate multiplied by the intended retention period) and the configured cap: if the cap is smaller than the desired usage, the effective retention window shrinks silently, which is a common surprise when diagnosing 'why did my logs from last week disappear' issues.

Formula

Actual journal disk usage

actual_usage = min(log_rate × retention_days, SystemMaxUse)

r
log generation rate per day
d
desired retention in days
M
SystemMaxUse cap

Worked example

With the default values below, Journalctl Disk Usage Calculator returns Actual Disk Usage of 4,096.00. Change any input above and every figure here is recalculated in your browser.

Inputs used

Log Generation Rateminimum 0 MB/day
200 MB/day
Desired Retention Periodminimum 0 days
30 days
SystemMaxUse Settingminimum 0 MB
4,096 MB

Results

Actual Disk Usage
4,096.00 MB
Days of Logs Actually Retained
20.5 days
Desired Usage (rate × retention)
6,000.00 MB
Status
Capped by SystemMaxUse — only ~20.5 days of logs will actually be retained, not 30

Step by step

  1. 1Values used
  2. 2Actual journal disk usage
  3. 3Actual Disk Usage= 4,096.00 MB
  4. 4Days of Logs Actually Retained= 20.5 days
  5. 5Desired Usage (rate × retention)= 6,000.00 MB
  6. 6Status= Capped by SystemMaxUse — only ~20.5 days of logs will actually be retained, not 30

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax or fees or charges into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

What happens when journald reaches SystemMaxUse?

journald automatically vacuums (deletes) the oldest journal entries to make room for new ones, keeping total usage at or below the configured cap — it does not fail or block logging, but old history is silently lost once the space limit is reached.

What is the default SystemMaxUse if I don't configure it?

If unset, journald defaults to using up to 10% of the filesystem it is stored on (typically /var/log/journal), with additional built-in limits like leaving at least 15% of the filesystem free — check journalctl --disk-usage and man journald.conf for the exact defaults on your distribution.

How do I retain logs longer without expanding local disk?

Forward logs to a centralized log aggregator (rsyslog, Loki, Elasticsearch, a SIEM) via journald's forwarding options or a log shipper, so long-term retention lives on remote storage while the local journal stays small and fast to query.

Journalctl Disk Usage Calculator | Calcrivo