I need to disable transparent_hugepage at boot time (before some big
services start up).  This is on centos7 machines using SystemD.

There are many ways to do this.  It isn't clear which is the
best/easiest way to do it via puppet.  (Here is a list of ways to do
it manually 
http://answers.splunk.com/answers/188875/how-do-i-disable-transparent-huge-pages-thp-and-co.html
and here is one more
http://docs.mongodb.org/manual/tutorial/transparent-huge-pages/)

The most straightforward way seems to be to edit /etc/default/grub:

Change this line in /etc/default/grub and add
transparent_hugepage=never to the GRUB_CMDLINE_LINUX.

i.e.

Change this line:

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos_ks-7/root
rd.lvm.lv=centos_ks-7/swap crashkernel=auto
vconsole.font=latarcyrheb-sun16 vconsole.keymap=us
intel_pstate=disable rhgb quiet transparent_hugepage=never"

to

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos_ks-7/root
rd.lvm.lv=centos_ks-7/swap crashkernel=auto
vconsole.font=latarcyrheb-sun16 vconsole.keymap=us
intel_pstate=disable rhgb quiet transparent_hugepage=never"

However doing that in puppet (even with Augeas) seems non-trivial.



Any suggestions?

Tom

P.S.  I'm also considering making a systemd "unit" that just sets the
parameter and is scheduled to run before any of the major services on
the machine. However that seems like a long way to do a short thing.

--
Email: t...@whatexit.org    Work: tlimonce...@stackoverflow.com
Skype: YesThatTom
Blog:  http://EverythingSysadmin.com

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAHVFxg%3DRPaAJ8X0mCWcgfVnGrRiAGS_rWMLdbU_diNv%2BSK53ug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to