Comment 48 for bug 1972159

Revision history for this message
In , mikhail.v.gavrilov (mikhail.v.gavrilov-redhat-bugs) wrote :

(In reply to Anita Zhang from comment #15)
>
> You're pretty close to the default limits set up for Fedora so if you're
> fine with the added pressure you may want to try bumping them for your
> system with an override like so:
>
> $ cat /etc/systemd/system/user@.service.d/99-oomd-override.conf

Directory `user@.service.d` is absent on my system.

$ ls /etc/systemd/system/user@.service.d
ls: cannot access '/etc/systemd/system/user@.service.d': No such file or directory

> [Service]
> ManagedOOMMemoryPressureLimit=65%
> $ sudo systemctl daemon-reload
> $ oomctl # check if new limit was applied
>
> The default values will likely be reworked once
> https://github.com/systemd/systemd/pull/20690 is merged. This will allow
> setting more tuned pressure values on slices within a user session rather
> than relying on one value for all of <email address hidden>.

As I am understand by default PressureLimit should be 50%

$ cat /usr/lib/systemd/oomd.conf.d/10-oomd-defaults.conf
[OOM]
DefaultMemoryPressureDurationSec=20s

$ cat /usr/lib/systemd/system/user@.service.d/10-oomd-user-service-defaults.conf
[Service]
ManagedOOMMemoryPressure=kill
ManagedOOMMemoryPressureLimit=50%

But oomctl show 60%, why?

$ oomctl
Dry Run: no
Swap Used Limit: 90.00%
Default Memory Pressure Limit: 60.00%
Default Memory Pressure Duration: 20s
System Context:
        Memory: Used: 55.3G Total: 62.6G
        Swap: Used: 104.5M Total: 63.9G
Swap Monitored CGroups:
        Path: /
                Swap Usage: (see System Context)
Memory Pressure Monitored CGroups:
        Path: /user.slice/user-1000.slice/user@1000.service
                Memory Pressure Limit: 50.00%
                Pressure: Avg10: 0.00 Avg60: 0.00 Avg300: 0.00 Total: 14s
                Current Memory Usage: 49.6G
                Memory Min: 250.0M
                Memory Low: 0B
                Pgscan: 85039860
                Last Pgscan: 85039860