If both RAM and swap go below 10% free, earlyoom issues SIGTERM to the
process with the largest oom_score. If both RAM and swap go below 5% free, earlyoom issues
SIGKILL
Fedora's earlyoom package is provided with the changed default settings:
EARLYOOM_ARGS="-r 0 -m 4 -M 409600 --prefer '^Web Content$' --avoid
'^(dnf|packagekitd|gnome-shell|gnome-session-c|gnome-session-b|lightdm|sddm|sddm-helper|gdm|gdm-wayland-ses|gdm-session-wor|gdm-x-session|Xorg|Xwayland|systemd|systemd-logind|dbus-daemon|dbus-broker|cinnamon|cinnamon-sessio|kwin_x11|kwin_wayland|plasmashell|ksmserver|plasma_session|startplasma-way|xfce4-session|mate-session|marco|lxqt-session|openbox)$'"
It means that:
1. SIGTERM threshold for MemAvailable is 4% (but not more than 400 MiB) and SIGKILL
threshold for MemAvailable is 2% (but not more than 200 MiB) by default. The change was
due to the fact that earlyoom tree was criticized for too aggressive thresholds by
default, and this was taken into account. Please update description in the proposal.
2. Firefox's children processes "Web Content" gets +300 to its oom_score. It
means that earlyoom will prefer to kill firefox tabs rather than entire browser. Similar
behavior is already practiced in chromium and electron-based apps by default.
3. Processes, the killing of which can lead to the killing of the entire session
(kwin_x11|kwin_wayland|plasmashell|ksmserver|plasma_session etc), receive reduced priority
in choosing a victim. dnf also gets low prio. This is yet another advantage that you can
mention in the proposal.
see
https://pagure.io/fedora-workstation/issue/119#comment-638366