[DOCS-8153] Comment on: "manual/tutorial/transparent-huge-pages.txt" Created: 23/Jun/16  Updated: 03/Nov/17  Resolved: 04/Aug/16

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

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Andrew Aldridge
Resolution: Won't Fix Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12.04

Location: https://docs.mongodb.com/v3.0/tutorial/transparent-huge-pages/
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36
Referrer: https://www.google.com/
Screen Resolution: 1920 x 1200


Participants:
Days since reply: 7 years, 27 weeks, 6 days ago

 Description   

This works if you want to reboot your system, but doesn't tell you how to disable the setting at runtime... Nor does it tell you what to do if "echo never > /sys/kernel/mm/transparent_hugepage/defrag" returns "Permission denied" to your administrator account. I can't even SUDO it.



 Comments   
Comment by Andrew Aldridge [ 04/Aug/16 ]

The THP page can only offer general advice; it is not intended to be a reference manual for every available distribution and configuration.

That said: to apply its changes at runtime, you can run the following as root:

if [ -d /sys/kernel/mm/transparent_hugepage ]; then
  thp_path=/sys/kernel/mm/transparent_hugepage
elif [ -d /sys/kernel/mm/redhat_transparent_hugepage ]; then
  thp_path=/sys/kernel/mm/redhat_transparent_hugepage
fi
 
echo 'never' > ${thp_path}/enabled
echo 'never' > ${thp_path}/defrag
 
unset thp_path

Feel free to reopen this ticket if you are not satisfied with this resolution.

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