@jor @sch00b
Comme l'ont suggéré d'autres, il y a #earlyoom qui semble correspondre :
« The oom-killer generally has a bad reputation among Linux users. One may have to sit in front of an unresponsive system, listening to the grinding disk for minutes, and press the reset button to quickly get back to what one was doing after running out of patience.

earlyoom checks the amount of available memory and free swap up to 10 times a second (less often if there is a lot of free memory). If both memory and swap (if any) are below 10%, it will kill the largest process (highest oom_score).

The percentage values are configurable via command line arguments. »

The (poor...) way #Linux handles Out Of Memory situations, and the lack of sophisticated application lifecycle management in FOSS toolkits, can make life on #LinuxMobile not so much fun. When memory fills up too much, devices lag and random stuff breaks.

@fakeshell from @furilabs ported #lmkd from Android to "pure" Linux and improved it in many ways. It consumes much less resources than #earlyoom and took my #FLX1 to over 5 days uptime for the first time!

https://github.com/FuriLabs/lmkd

#mobilelinux

“Oom” sounds like a sigh. 🧘

“Earlyoom” sounds like a tea blend. 🫖

https://github.com/rfjakob/earlyoom

#oom_killer #earlyoom

GitHub - rfjakob/earlyoom: earlyoom - Early OOM Daemon for Linux

earlyoom - Early OOM Daemon for Linux. Contribute to rfjakob/earlyoom development by creating an account on GitHub.

GitHub

Had some recent experience with #Linux #OOM (out of memory) management. In theory #systemd allows to set a MemoryMax property that would get a service killed if the service uses more that a memory ceiling. In practice I've found that the service is absurdly slowed down while trying to keep memory within limits. And only after a while does the service get killed.

After playing with this and failing to have it do what I wanted, I realised many people say Linux OOM is really bad and that it's best to implement this in userspace.

In the end I've found #earlyoom. It works perfectly. Problem solved.

https://github.com/rfjakob/earlyoom

GitHub - rfjakob/earlyoom: earlyoom - Early OOM Daemon for Linux

earlyoom - Early OOM Daemon for Linux. Contribute to rfjakob/earlyoom development by creating an account on GitHub.

GitHub

Hopefully this solves my OOM problems. I got:

  • vm.panic_on_oom enabled, so hopefully when I run out of memory, it just kills the VM instead of hanging.
  • #Earlyoom installed so it never comes to that.
  • #Zram enabled to get just a little more out of it.

I want to avoid uping the VM's ram as long as I can lol

#selfhosting #linux #microblog

How To Kill The Largest Process In An Unresponsive Linux System

Early OOM will kill the largest process in an unresponsive system when it has absolutely no other choices in Unix-like operating systems.

OSTechNix
How To Kill The Largest Process In An Unresponsive Linux System with Early OOM https://squeet.me/display/962c3e10-585b-edb3-ed8e-0c8020927802
How To Kill The Largest Process In An Unresponsive Linux System with Early OOM

OOM killer, also known as Out Of Memory killer, is a process that the Kernel uses when the system is critically low on memory. The main task of OOM killer is...

How To Kill The Largest Process In An Unresponsive Linux System with Early OOM #earlyoom https://www.ostechnix.com/kill-largest-process-unresponsive-linux-system/