Fedora 32 plans to include earlyoom for early response to memory shortages.

Published plan inclusion by default in Fedora 32 background processes earlyoom for early response to memory shortages in the system. If the amount of available memory drops below a specified threshold, earlyoom will forcibly terminate the process that is using the most memory (with the highest value in /proc/*/oom_score) by sending a SIGTERM (less than 10% free memory) or SIGKILL (less than 5%), preventing the system state from requiring buffer clearance. Earlyoom will allow for a more prompt response to memory shortages, avoiding the triggering of the OOM (Out Of Memory) handler in the kernel, which activates when the situation becomes critical and the system is generally unresponsive to user actions.

In more distant Fedora releases the possibility is being considered of including a memory shortage handler low-memory-monitor, which uses the newly introduced interface in the Linux kernel 5.2 at /proc/pressure/memory to assess memory shortage in the system, but unlike earlyoom, it does not immediately terminate processes, rather it sends a DBus notification to reduce memory consumption (if the situation does not normalize afterwards, activation of OOM Killer in the kernel may occur). The low-memory-monitor requires application modifications, thus it is considered a solution for the distant future that can be implemented after adapting GNOME applications.

To monitor memory shortages by applications in Glib 2.63.3 an API GMemoryMonitor, has been added to track signals from the low-memory-monitor and take action (for example, an application may free up memory used for caching, save files, run garbage collection, attempt to reduce memory fragmentation, or terminate idle auxiliary processes). Support for
GMemoryMonitor has also been added to xdg-desktop-portal for use in containerized applications delivered in flatpak format.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster