Skip to content

alex-harvey-z3q/puppet-disable_transparent_hugepage

Repository files navigation

disable_transparent_hugepage

Build Status

Table of contents

  1. Overview
  2. Usage
  3. Development

Overview

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.

Usage

Basic use:

include disable_transparent_hugepage

Development

Please read CONTRIBUTING.md before contributing.

Testing

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.

Release

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 and 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

About

Puppet module to disable Transparent Hugepages (THP)

Resources

License

Stars

Watchers

Forks

Packages

No packages published