So, as has been previously stated here, and as is documented in section
5 of the journald.conf man page (install man-db, run 'man 5
journald.conf'), journald will, by default, limit the journals' disk
allocation to either a maximum of 10% of available disk space, or to the
absolute size of 4GB, whichever is lower.

Example 1: You have a 120 GB disk, 70 GB are in use, leaving 50 GB. 10%
of 50 GB are 5 GB, but the absolute value of 4 GB is lower, so journald
will at most take 4 GB storage on this system (and dynamically less, if
the disk grows fuller).

Example 2: You have a 20 GB disk, 12 GB are in use, leaving 8 GB. 10% of
8 GB are 800 MB, which is less than 4 GB, so journald will at most take
800 MB storage on this system (and dynamically more or less, if disk
allocation changes).

Benjamin is now reporting 4.1 GB allocated, which is more than 4 GB, and
with the details above, this is unexpected. What could be the reason?
These limits are applied both when journald starts, and when vacuuming
takes place. So if Benjamins' logs have grown by 100 MB since journald
started, this can easily explain this situation. They will be reduced to
4 GB (or less, if the disk runs full) again next time vacuuming takes
place (such as when journald is restarted).

So unless these limits are considered a problem (why? disk space is
cheap, and you can modify them as needed if you're on a special
(embedded?) platform), I don't see a problem here.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1790205

Title:
  systemd journals take up a lot of space, and it's not obvious how much
  is used, and what the upper limit is.

Status in systemd:
  New
Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  After running Bionic for 3 months, I had 2.6 GB of journals.

  I would not expect from a normal desktop user that they should have to
  run commands like `sudo journalctl --vacuum-time=10d`.

  I would nominate this command as a sane default to have running at
  each reboot to ensure that logs do not exceed 500 MB:

  sudo journalctl --vacuum-size=500M

  Supposedly, a server should by default retain more logs, so perhaps
  this should be implemented through a configuration package "systemd-
  configuration-desktop" as a dependency of the ubuntu-desktop meta
  package?

  
  ..... as it turns out, it's hard to see how much disk space is used, and what 
the upper limit is, even when it is set and respected by default.

To manage notifications about this bug go to:
https://bugs.launchpad.net/systemd/+bug/1790205/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to