[4.1.0.23] Random closing of all apps

Yeah OOM killer seems to be pretty damn annoying. I “updated” from Xperia X to X10-2 and it has four gigs of ram which should be quite enough for normal use. Still some programs are being killed all the time in the background and they’re not even memoryhogs so something else is happening. First think probably is that this is aarch64 platform so programs do eat more ram by nature (remember using Windoze 64bit with 2 or 4 gigs of ram? :slight_smile:

Now i tried to adjust the behaviour of the oomkiller and “echo 2 > /proc/sys/vm/overcommit_memory” was not a good idea it seems. Note that this is a trinary value: 0 = “estimate if we have enough RAM”, 1 = “Always say yes”, 2 = “say no if we don’t have the memory”). That killed lipstick (UI) right away and i was left with a black screen unable to do anything, but still sfos was running there. Apparently UI doesn’t cope well if denied any ram (why would it ask too much?)

Wouldn’t dare to disable oomkiller completely (Put vm.oom-kill = 0 in /etc/sysctl.conf) because such irrational behaviour.

Now “echo 1 > /proc/sys/vm/oom_kill_allocating_task” seems most straightforward way and in some sense it does even work! So if application tries to allocate too much memory oomkiller should kill that task instead of the little ones that are helplessly running in the background. So having my daily programs running nicely i try to start web Browser and that dies instantly. Good. Trying second time it starts and i can use it normally and nothing got killed in the background. Funny how browser knew not to ask too much ram the second time it’s run :wink:

/proc/sys/vm/overcommit_ratio seems to be 50 now. There was a good discussion about that in the old forums. [Discussion] Oom Killer fine tuning (overcommit_ratio value) - together.jolla.com
Tried adjusting that but reaper keeps on reaping.

Anything else one can try to save the little ones?

2 Likes