blob: cab117659085d71c3608f98b4a600bcc1476d320 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
|