Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11334

Update Transparent Huge Pages documentation

    XMLWordPrintable

Details

    Description

      Documentation for setting Transparent Huge Pages on RHEL-based / tuned-based environments is incomplete. As mentioned in SERVER-16643, simply disabling THP is not enough, and disabling defrag is also needed.

      However, tuned do not let the user disable defrag, so the THP disabling configuration file needs to be amended, and used in combination with a script to disable defrag, or THP need to be disabled from the kernel configuration line in the grub config file.

      Below are the updated configuration files for the first approach (confirmed to be working), which actually get rid of both startup warnings (defrag and thp).

      /etc/tuned/no-thp/tuned.conf

      [main]
      include=virtual-guest
       
      [vm]
      transparent_hugepages=never
       
      [script]
      script=script.sh
      

      /etc/tuned/no-thp/script.sh

      #!/bin/sh
       
      . /usr/lib/tuned/functions
       
      start() {
          echo never > /sys/kernel/mm/transparent_hugepage/defrag
          return 0
      }
       
      stop() {
          return 0
      }
       
      process $@
      

      Attachments

        Issue Links

          Activity

            People

              andrew.feierabend@mongodb.com Andrew Feierabend (Inactive)
              charles.sarrazin@mongodb.com Charles Sarrazin (Inactive)
              Andrew Feierabend Andrew Feierabend (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                2 years, 35 weeks, 4 days ago