PINE64
Earlyoom: kill process before freezing - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Earlyoom: kill process before freezing (/showthread.php?tid=9933)



Earlyoom: kill process before freezing - regivanx - 05-23-2020

After installing zram, my PBP still froze due to lack of memory, which required reboot.

So I installed Earlyoom, which kills the process it estimates abuse when memory is full.

Installation is very easy: just follow the download and compilation instructions.

You must install the git package to download and the base-devel meta-package to compile.

You can install go and cppcheck if you want to run the built-in self-tests. I don't know if it's usefull.

Earlyoom tries to guess what is the "right" process to kill. For me, this is always the youtube.com tab process of Chromium, which is a good decision because this page can use more than 1go (!) of memory. At the same time, it is not an important tab.

I also tested several memory limits before letting earlyoom go into action.

By default, earlyoom kills a process if available memory and free swap is less than 10%. I lowered this value to 2% for both without preventing earlyoom from working properly. For values less than 1%, the computer freezes before the intervention of earlyoom.

2% may be too low ( <=> 80 Mo for memory, 20 Mo for swap), but for now, earlyoom kill nasty process without problem with this value. If the computer freezes again, I will increase this value.