logoalt Hacker News

ducktectivetoday at 8:49 AM10 repliesview on HN

Tangential, but does anyone know why in 2026 and on Debian 13, my machine still hangs when some process exhausts RAM?

Is there really no higher-priority kernel process to prevent total freeze of the system and send a SIGKILL to the culprit process when such a scenario happens?


Replies

afishhhtoday at 9:15 AM

Set `/sys/kernel/mm/lru_gen/min_ttl_ms` at boot (see https://docs.kernel.org/admin-guide/mm/multigen_lru.html).

User-space OOM killers never really worked for me and imo are not a proper solution anyway. This option instead lets you make the kernel OOM killer actually work for desktop use.

Currently have it set to `1000` and it works very well for me (don't remember the last time I had a full system freeze due to OOM).

dev_hugepagestoday at 8:53 AM

This is called an oomkiller. The kernel has one but it kicks in very late and the kernel prefers to do page trashing instead of killing processes.

systemd-oomd should be integrated in systemd, you can configure it to your liking and see if it improves your problem.

show 1 reply
negreltoday at 8:55 AM

OS are designed to fully exploit available resources, Linux tries its best before triggering an OOM kill.

I recommend using the earlyoom if you want more aggresive oom kill:

https://github.com/rfjakob/earlyoom

The README contains a lot of interesting information.

show 1 reply
BoredomIsFuntoday at 9:35 AM

It does not if you switch swapp off and use zram instead. I am typing right now on such a setup wityh 16 GiB ram and it occasionally, once a week or so, kills my firefox due to oom.

If you are you using disk swap - not sure why would if you have a SSD, but I once heard some justification for doing that - then install early OOM.

fc417fc802today at 9:29 AM

> does anyone know why

In a nutshell, overcommit. It's more or less broken by design but it's also incredibly practical so pretty much everyone does it.

Couple that with the fact that it's difficult bordering on impossible to correctly determine the culprit. If you've got 16 GB RAM and the user launches 3 processes each of which attempts to use 8 GB who should you kill?

show 1 reply
pndctoday at 9:32 AM

I had a 1GB Debian VM which started freezing (requiring a hard reboot) after a routine aptitude upgrade to apply security patches. It was indeed caused by low memory, but not out of memory as there was still enough swap space remaining.

The culprit turned out to be the kernel itself, and rolling back to a 6.1 series kernel made the problem go away. I see that Linus's love for vibe-coding is already paying dividends.

CoastalCodertoday at 9:11 AM

Just mentioning this in case it's helpful:

If you know ahead of time which programs / processes are at risk of unacceptably high memory usage, check out "ulimit".

trompetenaccountoday at 9:25 AM

This has finally been fixed in the latest Ubuntu version (26), it now force closes the culprit.

show 1 reply
elektrontamertoday at 8:51 AM

I always install earlyoom for that reason

pestatijetoday at 9:23 AM

not tangential at all...try setting up a swap partition

show 1 reply