Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-18113

Packages should disable transparent hugepages

    XMLWordPrintable

Details

    • Bug
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • 3.0.0, 3.0.1, 3.0.2
    • None
    • Packaging
    • ALL
    • Hide

      Install MongoDB 3.0.2 and run with WiredTiger

      cat /var/log/mongodb/mongodb.log

      Look for warnings in the log:

      2015-04-18T05:16:30.880+0000 I CONTROL  [initandlisten] 
      2015-04-18T05:16:30.880+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
      2015-04-18T05:16:30.880+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
      2015-04-18T05:16:30.880+0000 I CONTROL  [initandlisten] 
      2015-04-18T05:16:30.880+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
      2015-04-18T05:16:30.880+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
      2015-04-18T05:16:30.880+0000 I CONTROL  [initandlisten] 
      

      Show
      Install MongoDB 3.0.2 and run with WiredTiger cat /var/log/mongodb/mongodb.log Look for warnings in the log: 2015-04-18T05:16:30.880+0000 I CONTROL [initandlisten] 2015-04-18T05:16:30.880+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. 2015-04-18T05:16:30.880+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never' 2015-04-18T05:16:30.880+0000 I CONTROL [initandlisten] 2015-04-18T05:16:30.880+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. 2015-04-18T05:16:30.880+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never' 2015-04-18T05:16:30.880+0000 I CONTROL [initandlisten]

    Description

      The script in /etc/init.d/mongod should disable transparent hugepages. WiredTiger is complaining on startup because this isn't being done.

      Here's a patch:

              if [ -f /sys/kernel/mm/transparent_hugepage/enabled ]; then
                  if grep -q "\[always\]" /sys/kernel/mm/transparent_hugepage/enabled; then
                      echo never > /sys/kernel/mm/transparent_hugepage/enabled
                      if [ "$?" != 0 ]; then
                          echo "Error disabling transparent_hugepages, are you running in a linux container?" >&2
                          echo "If the server fails to start, check that transparent hugepages are disabled." >&2
                      fi
                  fi
              fi
      

      Attachments

        Issue Links

          Activity

            People

              backlog-server-devplatform Backlog - Server Development Platform Team (SDP)
              chengas123 Ben McCann
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: