[DOCS-6226] Augment tuned/ktune THP method to also disable defrag Created: 16/Sep/15  Updated: 11/Jan/17  Resolved: 05/Oct/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Improvement Priority: Minor - P4
Reporter: Kevin Pulo Assignee: Kay Kim (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DOCS-6130 Comment on: "manual/tutorial/transpar... Closed
Participants:
Days since reply: 8 years, 18 weeks, 1 day ago

 Description   

http://docs.mongodb.org/manual/tutorial/transparent-huge-pages/

This will allow the existing THP guide of "do the init script, and maybe also do tuned/ktune (if necessary)" to be simplified back down to just "do the init script or tuned/ktune (as appropriate)".

The RHEL6 method is TBD.

The RHEL7 method will be the following (or substantially similar):

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

Then create the script /etc/tuned/no-thp/script.sh with the following contexts, and give it execution rights.

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



 Comments   
Comment by Mark Helmstetter [ 14/Oct/15 ]

This worked for me. Don't forget to sudo chmod u+x script.sh

Generated at Thu Feb 08 07:51:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.