Skip to content

Instantly share code, notes, and snippets.

@fontora
Last active April 30, 2022 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fontora/0ac2e899efa372bba0137d89cd8f397b to your computer and use it in GitHub Desktop.
Save fontora/0ac2e899efa372bba0137d89cd8f397b to your computer and use it in GitHub Desktop.
Test
sudo cat > /etc/systemd/system/disable-thp.service << EOL
[Unit]
Description=Disable Transparent Huge Pages (THP)
[Service]
Type=simple
ExecStart=/bin/sh -c "echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled && echo 'never' > /sys/kernel/mm/transparent_hugepage/defrag"
[Install]
WantedBy=multi-user.target
EOL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment