created this job
, modified by
os_tweaks.sh does not permanently disable THP transparent huge pages
It only does it for the running system, but on reboot things will be back to previous state.
Options include advising the user what to do, or just doing it.
Update - this seems to be easiest way to do things:
So using sysfsutils package - available for Unbuntu and CentOS and not dependent on systemd vs rc.local.
For example /etc/rc.local can be updated to contain:
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
But this doesn't work on CentOS 7 for example without turning on rc.local service.
Investigations required perhaps.
Also we should update os_tweaks.sh for AWS Linux/Linux 2