feat: OOM Killer Tuning script with CachyOS-inspired systemd-oomd config - #4
Draft
TuxLux40 wants to merge 1 commit into
Draft
feat: OOM Killer Tuning script with CachyOS-inspired systemd-oomd config#4TuxLux40 wants to merge 1 commit into
TuxLux40 wants to merge 1 commit into
Conversation
… config Adds fixes/oomd-killer-tuning.sh which configures systemd-oomd with more aggressive thresholds (SwapUsedLimit=80%, DefaultMemoryPressureLimit=40%, DefaultMemoryPressureDurationSec=20s) to proactively kill memory-hungry processes before the system becomes unresponsive — matching CachyOS tuning. The script also enables ManagedOOM on user.slice / user@.service so oomd actually monitors user sessions, and optionally installs earlyoom as a supplemental or fallback OOM killer for systems without systemd-oomd. Registers the entry under System Setup > Fixes in tab_data.toml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vEFroDTGqB5VMPHd4ZQhJ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Adds
core/tabs/system-setup/fixes/oomd-killer-tuning.sh— an interactive script that tunes the out-of-memory killer to prevent system freezes under memory pressure, mirroring the approach used by CachyOS.What the script does
systemd-oomd tuning (primary path, requires systemd 247+, cgroup v2, PSI):
/etc/systemd/oomd.conf.d/60-tuning.confwith CachyOS-inspired thresholds:SwapUsedLimit=80%(upstream default: 90%)DefaultMemoryPressureLimit=40%(upstream default: 60%)DefaultMemoryPressureDurationSec=20s(upstream default: 30s)ManagedOOMSwap=killandManagedOOMMemoryPressure=killonuser.sliceanduser@.servicevia drop-in configs so oomd actually monitors user sessions.systemd-oomd.service.earlyoom (optional supplement or standalone fallback):
/etc/default/earlyoomif the file exists (Debian/Ubuntu-style), with configurable free-memory and free-swap thresholds.Prerequisite checks (informational, non-blocking):
/sys/fs/cgroup/cgroup.controllers)/proc/pressure/memory)systemd-oomd.serviceunit existenceRegistered in
System Setup → Fixesintab_data.tomlwithtask_list = "I SS PFM".Issues / other PRs related
Generated by Claude Code