CachyOS-Settings icon indicating copy to clipboard operation
CachyOS-Settings copied to clipboard

systemd: Introduce systemd-oomd conf

Open EliasTheGrandMasterOfMistakes opened this issue 11 months ago • 9 comments

oomd.conf define a systemd oomd conf, service can be enabled manually by user when enable systemctl enable --now systemd-oomd

Based on https://www.reddit.com/r/archlinux/comments/mk2lg6/how_to_properly_configure_systemdoomd/?rdt=56355

Is possible too for separate it in a new package and enable this service in it. A oomd.conf.d/ can be too prefered if be necessary

I'm not against it, but, unfortunately, we offer in repositories kernels with PRJC schedulers that don't support PSI, which uses systemd-oomd to monitor the system load, so I'm not sure if we should enable that by default in cachyos-settings package.

ventureoo avatar Feb 19 '25 14:02 ventureoo

so I'm not sure if we should enable that by default in cachyos-settings package

Not familiar with systemd-oomd so I need to look through some documentation to see what the conf is doing, but we could include the conf (if it's good) and just have systemd-oomd as an optional service to enable, i.e. what we have right now.

1Naim avatar Feb 19 '25 14:02 1Naim

I'm not against it, but, unfortunately, we offer in repositories kernels with PRJC schedulers that don't support PSI, which uses systemd-oomd to monitor the system load, so I'm not sure if we should enable that by default in cachyos-settings package.

can be good to warning first like a new doc page just to explain in details systemd-oomd?

so I'm not sure if we should enable that by default in cachyos-settings package

Not familiar with systemd-oomd so I need to look through some documentation to see what the conf is doing, but we could include the conf (if it's good) and just have systemd-oomd as an optional service to enable, i.e. what we have right now.

i'm not familiar too, but this reddit tip has worked for me ManagedOOMMemoryPressure=kill is used to set default behaviour to kill in memory pressure threshold iirc. ManagedOOMMemoryPressureLimit=70% is for memory pressure threshold limit usage, i has changed to 70% instead 50% to be not much agressive. on manager looks that DefaultCPUAccounting=yes DefaultIOAccounting=yes DefaultMemoryAccounting=yes DefaultTasksAccounting=yes is for accounting task for systemd-oomd i think is used cgroup for these and for SwapUsedLimitPercent=90% DefaultMemoryPressureDurationSec=20s i has changed to just 90% of swap to not be much agressive

Personally im fine with it.

Yes, prjc does need PSI, but not many users are using bmq and also would require additonal enabling of the service.

Thank you

after fzf made me go oom today, I'm all for this!

edit: that being said using this config, this command still gets me oom: systemd-run --user tail /dev/zero and nothing is getting killed. Unsure if I'm doing it wrong?!

notpentadactyl avatar Feb 22 '25 17:02 notpentadactyl

after fzf made me go oom today, I'm all for this!

edit: that being said using this config, this command still gets me oom: systemd-run --user tail /dev/zero and nothing is getting killed. Unsure if I'm doing it wrong?!

you have enable sudo systemctl enable --now systemd-oomd.service? image

after fzf made me go oom today, I'm all for this! edit: that being said using this config, this command still gets me oom: systemd-run --user tail /dev/zero and nothing is getting killed. Unsure if I'm doing it wrong?!

you have enable sudo systemctl enable --now systemd-oomd.service?

Yes, I had it enabled, I also disabled and re-enabled it now, then I tried: systemd-run --user tail /dev/zero

image

image

At that point I did killall tail to not run out.

notpentadactyl avatar Feb 23 '25 18:02 notpentadactyl

er tail /d

your system ram is really big, i think if you leave for some time the systemd-oomd will kill it but you can try with defaults from second comment in reddit

ManagedOOMMemoryPressure=kill ManagedOOMMemoryPressureLimit=50%

you can try too: DefaultOOMPolicy=kill