Re: Let's talk about the elephant in the room - the Linux kernel's inability to gracefully handle low memory pressure

From: ndrw
Date: Thu Aug 22 2019 - 22:04:39 EST

On 20/08/2019 07:46, Daniel Drake wrote:
To share our results so far, despite this daemon being a quick initial
implementation, we find that it is bringing excellent results, no more memory
pressure hangs. The system recovers in less than 30 seconds, usually in more
like 10-15 seconds.

That's obviously a lot better than hard freezes but I wouldn't call such system lock-ups an excellent result. PSI-triggered OOM killer would have indeed been very useful as an emergency brake, and IMHO such mechanism should be built in the kernel and enabled by default. But in my experience it does a very poor job at detecting imminent freezes on systems without swap or with very fast swap (zram). So far, watching MemAvailable (like earlyoom does) is far more reliable and accurate. Unfortunately, there just doesn't seem to be a kernel feature that would reserve a user-defined amount of memory for caches.

There's just one issue we've seen so far: a single report of psi reporting
memory pressure on a desktop system with 4GB RAM which is only running
the normal desktop components plus a single gmail tab in the web browser.
psi occasionally reports high memory pressure, so then psi-monitor steps in and
kills the browser tab, which seems erroneous.

Is it Chrome/Chromium? If so, that's a known bug (

Best regards,