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

Packages should disable transparent hugepages

    • Server Development Platform
    • 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]

      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
      

            Assignee:
            backlog-server-devplatform [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
            Reporter:
            chengas123 Ben McCann
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: