Details
-
Task
-
Resolution: Won't Fix
-
Major - P3
-
None
-
0.2
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
- is related to
-
SERVER-33886 Ship with a tuned profile for MongoDB on RHEL and friends
-
- Closed
-
- related to
-
DOCS-12902 Separately disabling THP defrag is not necessary when THP is disabled
-
- Closed
-