Skip to content

Instantly share code, notes, and snippets.

Last active Jun 13, 2018
What would you like to do?
Disable Transparent Huge Pages on CoreOS
$ sudo -i
# vim /etc/systemd/system/disable-transparent-huge-pages.service
# systemctl enable disable-transparent-huge-pages
# systemctl start disable-transparent-huge-pages
# systemctl status disable-transparent-huge-pages
# cat /sys/kernel/mm/transparent_hugepage/enabled
# cat /sys/kernel/mm/transparent_hugepage/defrag
Description=Disable Transparent Huge Pages
ExecStart=/usr/bin/sh -c "/usr/bin/echo "never" | tee /sys/kernel/mm/transparent_hugepage/enabled"
ExecStart=/usr/bin/sh -c "/usr/bin/echo "never" | tee /sys/kernel/mm/transparent_hugepage/defrag"
Copy link

Benjamin-Dobell commented Nov 29, 2016

If you're a Ubuntu 16.04 user and stumble across this like I did, then for Ubuntu 16.04; in disable-transparent-huge-pages.service simply replace instances of /usr/bin with /bin.

Copy link

erkolson commented Nov 29, 2017

The quoting as displayed here does not work. I removed the quotes around "never" but perhaps escaping them would work too.

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