How does journalctl counts --disk-usage?

Found the answer with gemini:

See the red arrows … 29 files a 8 MB = 232 MB but journalctl counts different:


Generated on 2024-04-01 17:25:1711985130

#################### inxi -Fxzc0 ########################

  Kernel: 6.1.80-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
  Desktop: Xfce v: 4.18.1 Distro: Manjaro base: Arch Linux
  Type: Laptop System: LENOVO product: 81RS v: Lenovo Yoga S740-14IIL serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN serial: <superuser required> UEFI: LENOVO
    v: BYCN39WW date: 05/28/2021
  ID-1: BAT0 charge: 64.9 Wh (99.4%) condition: 65.3/62.0 Wh (105.3%) volts: 17.1 min: 15.4
    model: LGC L19L4PD2 status: full
  Info: quad core model: Intel Core i7-1065G7 bits: 64 type: MT MCP arch: Ice Lake rev: 5 cache:
    L1: 320 KiB L2: 2 MiB L3: 8 MiB
  Speed (MHz): avg: 502 high: 1220 min/max: 400/3900 cores: 1: 400 2: 400 3: 1220 4: 400 5: 400
    6: 400 7: 400 8: 400 bogomips: 23968
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Device-1: Intel Iris Plus Graphics G7 vendor: Lenovo driver: i915 v: kernel arch: Gen-11
    bus-ID: 00:02.0
  Device-2: NVIDIA GP108M [GeForce MX250] vendor: Lenovo driver: nvidia v: 550.54.14 arch: Pascal
    bus-ID: 2b:00.0
  Device-3: Chicony Integrated Camera driver: uvcvideo type: USB bus-ID: 3-5:5
  Display: x11 server: X.Org v: 21.1.11 driver: X: loaded: modesetting,nvidia unloaded: nouveau
    dri: iris gpu: i915 resolution: 1: 1920x1080~60Hz 2: N/A
  API: EGL v: 1.5 drivers: iris,nvidia,swrast platforms: active: gbm,x11,surfaceless,device
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 24.0.2-manjaro1.1 glx-v: 1.4
    direct-render: yes renderer: Mesa Intel Iris Plus Graphics (ICL GT2)
  Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Lenovo driver: sof-audio-pci-intel-icl
    bus-ID: 00:1f.3
  API: ALSA v: k6.1.80-1-MANJARO status: kernel-api
  Server-1: sndiod v: N/A status: off
  Server-2: PipeWire v: 1.0.3 status: active
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel bus-ID: 00:14.3
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek RTL8153 Gigabit Ethernet Adapter driver: r8152 type: USB bus-ID: 2-1.4:4
  IF: enp0s13f0u1u4 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: pan1 state: down mac: <filter>
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB bus-ID: 3-10:8
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
  Local Storage: total: 1.86 TiB used: 390.53 GiB (20.6%)
  ID-1: /dev/nvme0n1 vendor: Micron model: MTFDHBA1T0TCK size: 953.87 GiB temp: 58.9 C
  ID-2: /dev/sda vendor: Western Digital model: WD10EARX-00N0YB0 size: 931.51 GiB type: USB
  ID-3: /dev/sdb vendor: Kingston model: DataTraveler 2.0 size: 14.54 GiB type: USB
  ID-1: / size: 57.85 GiB used: 38.75 GiB (67.0%) fs: ext4 dev: /dev/nvme0n1p8
  ID-2: /boot/efi size: 259.5 MiB used: 132.8 MiB (51.2%) fs: vfat dev: /dev/nvme0n1p1
  ID-1: swap-1 type: partition size: 16.67 GiB used: 0 KiB (0.0%) dev: /dev/nvme0n1p9
  System Temperatures: cpu: 51.0 C mobo: N/A
  Fan Speeds (rpm): N/A
  Memory: total: 16 GiB note: est. available: 15.19 GiB used: 3.26 GiB (21.4%)
  Processes: 302 Uptime: 38m Init: systemd
  Packages: 2064 Compilers: clang: 16.0.6 gcc: 13.2.1 Client: Unknown Client: wrapper-2.0
    inxi: 3.3.33

I could also never understand this. In my case the directory is twice at large as what the command says. Maybe temporary files… i do not know. But it seems that using --vacuum(size/time) commands also sets a limit somewhere, although that is documented nowhere. I guess only L.P. knows exactly what systemd does at a lower level.

See my edited post above!

In my case its constriction seems to hold true.

grep -i 50 /etc/systemd/journald.conf.d/00-journal-size.conf 
$ journalctl --disk-usage 
Archived and active journals take up 49.7M in the file system.
$ sudo du -sh /var/log/journal/5a81eef22cea49048164a46088cdd714/
50M     /var/log/journal/5a81eef22cea49048164a46088cdd714/

Ah, ok, sparse files. That explains the size difference. About the limits though, it is still dark matter. Because everything in my conf is commented. As said, if you have nothing in conf or drop in folder, it seems it sets a limit when you use the vacuum commands. That is what my experiments show.

I have configured


So 232 is nearby.

And if i recall it correct, there is a limit set at compile time of journalct: Arch or Manjaro?!

If you uncomment and set it manually it respects it. I just wonder for the defaults. According to some documentation they are 4 GB limit.

probably that

Still, after i used

sudo journalctl --vacuum-size=400M

it stays at that size. So it stores it somewhere. Nicely undocumented neither in the man page nor in the conf.