Forge Home

disable_transparent_hugepage

Disables Transparent Hugepages (THP)

2,954,913 downloads

37,508 latest version

3.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

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
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'alexharvey-disable_transparent_hugepage', '1.5.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add alexharvey-disable_transparent_hugepage
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install alexharvey-disable_transparent_hugepage --version 1.5.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

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