Taking down my entire system instead of killing one process is pretty fucking stupid, I would say. So yeah, is there a way to make it not do that?
>>107496346My issue is the OOM killer tends to take a minute or more to kick in, then bricks my desktop session, very annoying. You can run some programs that do the OOM, cause the kernel onto gives a shit about getting enough memory to continue running and doesn’t know what matters and what doesn’t, cause it’ll keep rolling regardless. Can take a look here: https://wiki.archlinux.org/title/Improving_performance#Improving_system_responsiveness_under_low-memory_conditionsArch Wiki always has useful info that can normally be adapted to other distros with a bit of work
>>107496346baste pigrel
>>107496346Just install thishttps://github.com/rfjakob/earlyoom
>>107496346look into the freebsd implementation
>>107496998Earlyoom uses the same algo to decide what to kill the kernel normally uses, just faster. My problem is that the kernel always kills the wrong thing.
>>107496346No, and this is why everyone uses an userspace OOM killer
>>107496346just don't run out of memory
>>107496346I think it would help answering why you are encountering the OOM killer at all.I'm assuming you also posted >>107496678, stating "desktop session" and linked an Arch page that mentioned low memory.So..it sounds like a end-user system that doesn't have enough memory.But, exactly how low are we talking about here?Sure, Linux can do well in low memory situations, but I think a 8 GB minimum is a good standard for a modern Linux end-user/desktop-oriented system.And what program is being killed?
>>107496346You can write your own OOM killer with just bash, run ps on a loop and if something is hogging memory send a sigterm, sigkill if the pid is still present on the next loop.
I think what I want is to enable systemd-oomd. It seems to do 90% the sensible thing. I'm not sure taking down an entire cgroup when one process is problematic is a good idea though.>>107500293im not that guy, no. I was trying to run some docker thing and it took down my sshd, my graphical shell, everything. i have 32G, amount of ram isn't the problem (or if it is I'll wait for the ai crash to do anything about it).
>>107500654Have not heard of systemd-oomd. Thanks for that! Probably worth the shot and determining that performs better than standard OOM.32 GB is really good for many systems, so a memory leak may the culprit in the docker containers you were trying to run. Try an older image if possible. Or if the project is open source, maybe there is a Issue request about memory issues.Or could be a misconfiguration.
>>107498747but that's wrong you fucking mongoloid
Can't you just turn off overcommit?
>>107498747In earlyoom you can configure what you want to not be killed. Use --avoid