Created
December 21, 2019 03:59
-
-
Save yasuoohno/7d813e88d1449ff83610620e35d26d80 to your computer and use it in GitHub Desktop.
Tuned - Disable Transparent HugePages
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
{ | |
CUSTOM_TUNED="disable-thp" | |
PROFILE_DIR="/etc/tuned/$CUSTOM_TUNED" | |
TUNED_CONF="$PROFILE_DIR/tuned.conf" | |
ACTIVE_PROFILE=`tuned-adm active | cut -d " " -f 4` | |
sudo mkdir -p "$PROFILE_DIR" | |
cat <<EOF | sudo tee "$TUNED_CONF" | |
[main] | |
include= $ACTIVE_PROFILE | |
[vm] | |
transparent_hugepages=never | |
EOF | |
sudo chmod +x "$TUNED_CONF" | |
sudo tuned-adm profile "$CUSTOM_TUNED" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment