by default in Fedora 32 background processes 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 of including a memory shortage handler , which uses the newly introduced interface in the Linux kernel 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 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 an API , 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
