Systemd MaxLevelStore seems to have no effect

I want to reduce writing to my SSD, journaling seems to be a bit heavy with systemd so I took a look at how many lines belong to each priority level:

for pri in emerg alert crit err warning notice info debug;
do
  echo $pri; journalctl -b 0 -p $pri --no-pager | wc
done

The results showed:

emerg 
      1       4      17 
alert 
      1       4      17 
crit 
     20     123    1946 
err 
     56     532    4916 
warning 
    289    4037   40327 
notice 
    422    5782   55144 
info 
   2988   36970  308441 
debug 
   3292   41510  362952

I’m not running a super critical server here, just my plain old personal laptop. So I was thinking what about having systemd journaling set up to only save to disk the priorities from “notice” and more important. I think I’ve read you can make a drop-in with this in it:

#  /etc/systemd/journald.conf.d/override.conf
[Journal]
MaxLevelStore=notice

and I rebooted. I thought this would be enough that the loop I did before would look something like this:

emerg 
      1       4      17 
alert 
      1       4      17 
crit 
     20     123    1946 
err 
     56     532    4916 
warning 
    289    4037   40327 
notice 
    422    5782   55144 
info 
      1       4        17
debug 
      1       4       17

But that did not happen, the resulting line dumps were similar to before with differences due to it being a different bootup. So why doesn’t this ‘drop-in’ work?

I’ve also confirmed the config change made it to the service with:


systemd-analyze cat-config systemd/journald.conf

which correctly showed my edit at the drop-in:


# /etc/systemd/journald.conf.d/override.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it under the
#  terms of the GNU Lesser General Public License as published by the Free
#  Software Foundation; either version 2.1 of the License, or (at your option)
#  any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the journald.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/journald.conf' to display the full config.
#
# See journald.conf(5) for details.

[Journal]
MaxLevelStore=notice

so what’s wrong here?

Added journalctl, journald, systemd and removed server

I found the solution, it was working but I used the wrong output syntax, this is the correct way to prove that ‘info’ and ‘debug’ is being blocked:


journalctl -b 0 PRIORITY=6 + PRIORITY=7

When I do that I just get a small blob about rotating the journal which I think comes up before the drop-in takes effect.