summaryrefslogtreecommitdiffstats
path: root/core/modules/bwlp-stage4-tweaks/data/opt/openslx/scripts/systemd-general_system_tweaks
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/bwlp-stage4-tweaks/data/opt/openslx/scripts/systemd-general_system_tweaks')
-rwxr-xr-xcore/modules/bwlp-stage4-tweaks/data/opt/openslx/scripts/systemd-general_system_tweaks21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/modules/bwlp-stage4-tweaks/data/opt/openslx/scripts/systemd-general_system_tweaks b/core/modules/bwlp-stage4-tweaks/data/opt/openslx/scripts/systemd-general_system_tweaks
new file mode 100755
index 00000000..cab11765
--- /dev/null
+++ b/core/modules/bwlp-stage4-tweaks/data/opt/openslx/scripts/systemd-general_system_tweaks
@@ -0,0 +1,21 @@
+#!/bin/ash
+
+# General stuff
+
+# Breaks performance with certain workloads, so disable.
+# See https://unix.stackexchange.com/a/185172 for details and further references
+echo never > /sys/kernel/mm/transparent_hugepage/defrag
+echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag
+# New player in town doing pretty much the same, tame it
+echo 1 > /proc/sys/vm/compaction_proactiveness # default 20
+# Don't swap to easily
+echo 10 > /proc/sys/vm/swappiness
+
+# run-parts-like stuff
+DIR="$0.d"
+if [ -d "$DIR" ]; then
+ for file in "$DIR"/*; do
+ [ -x "$file" ] && "$file"
+ done
+fi
+exit 0