Last active
July 15, 2020 02:01
-
-
Save thomsh/c93581fcb9f50275140d05a200f31973 to your computer and use it in GitHub Desktop.
Desktop kernel settings WIP
This file contains 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
#!/usr/bin/env bash | |
# Enable all sysrq https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html | |
sysctl -w kernel.sysrq=1 # 1 mean all | |
# Ask the kernel to keep 3% of the ram free | |
sysctl -w vm.min_free_kbytes="$(grep '^MemTotal:' /proc/meminfo |awk '{print int($2*0.03)}')" | |
# Ask the kernel to keep 3% of the ram for admin things | |
sysctl -w vm.admin_reserve_kbytes="$(grep '^MemTotal:' /proc/meminfo |awk '{print int($2*0.03)}')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment