This module disables Transparent Hugepages (THP) on Linux platforms as required by applications such as MongoDB and Redis. The procedure is based on recommendations published at mongodb.org.
The module changes the /sys/kernel/mm/transparent_hugepage/enabled
and /sys/kernel/mm/transparent_hugepage/defrag
settings, adds an init service to ensure the changes persist across reboots, and if applicable, configures tuned.
Basic use:
include disable_transparent_hugepage
Please read CONTRIBUTING.md before contributing.
Make sure you have:
- rake
- bundler
Install the necessary gems:
bundle install
To run the tests from the root of the source code:
bundle exec rake spec
To run the acceptance tests:
To run the acceptance tests:
BEAKER_set=centos-66-x64 bundle exec rake spec/acceptance
BEAKER_set=centos-72-x64 bundle exec rake spec/acceptance
etc.
This module uses Puppet Blacksmith to publish to the Puppet Forge.
Ensure you have these lines in ~/.bash_profile
:
export BLACKSMITH_FORGE_URL=https://forgeapi.puppetlabs.com
export BLACKSMITH_FORGE_USERNAME=alexharvey
export BLACKSMITH_FORGE_PASSWORD=xxxxxxxxx
Build the module:
bundle exec rake build
Push to Forge:
bundle exec rake module:push
Clean the pkg dir (otherwise Blacksmith will try to push old copies to Forge next time you run it and it will fail):
bundle exec rake module:clean