Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Created January 4, 2019 16:16
Show Gist options
  • Save ableasdale/84c370bb3fb8a985a1660bbae868180a to your computer and use it in GitHub Desktop.
Save ableasdale/84c370bb3fb8a985a1660bbae868180a to your computer and use it in GitHub Desktop.
Linux: Disabling Transparent Huge Pages using grubby
#!/bin/sh
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
for KERNEL in /boot/vmlinuz-*; do
grubby --update-kernel="$KERNEL" --args='transparent_hugepage=never'
done
@ableasdale
Copy link
Author

You should also be able to update multiple kernels by running something like this:

grubby --update-kernel=ALL --args="transparent_hugepage=never"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment