$ 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
Disable Transparent Huge Pages on CoreOS
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
[Unit] | |
Description=Disable Transparent Huge Pages | |
[Service] | |
Type=oneshot | |
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" | |
[Install] | |
WantedBy=multi-user.target |
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
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
.