disable_transparent_hugepage

Disables Transparent Hugepages (THP)

Alex Harvey

alexharvey

2,539,797 downloads

33,322 latest version

3.1 quality score

Version information

  • 1.5.0 (latest)
  • 1.4.1
  • 1.4.0
  • 1.3.0
  • 1.2.1
  • 1.2.0
  • 1.0.3
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Apr 20th 2020
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.0.0 < 7.0.0
  • RedHat
    ,
    CentOS
    ,
    Debian
    ,
    Ubuntu

Start using this module

Documentation

alexharvey/disable_transparent_hugepage — version 1.5.0 Apr 20th 2020

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