[SERVER-18989] Test for THP is not accurate Created: 16/Jun/15  Updated: 07/Apr/23  Resolved: 23/Feb/23

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Ronan Bohan Assignee: Backlog - Service Architecture
Resolution: Duplicate Votes: 1
Labels: re-triaged-ticket
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-22257 Remove the THP "defrag" startup warning Backlog
Related
related to SERVER-22257 Remove the THP "defrag" startup warning Backlog
Assigned Teams:
Service Arch
Participants:

 Description   

MongoDB checks whether THP and THP Defrag are enabled by checking the contents of files present under the '/sys/kernel/mm/transparent_hugepage' directory.

There have been reports that these files can still exist and have the relevant configuration set to 'always' even if THP has been disabled via the boot-time parameter, as described in the preferred method in the online documentation.

Here are some relevant links to RHEL support cases:

  1. How to use, monitor, and disable transparent hugepages in Red Hat Enterprise Linux 6? (Note though the test at the end checks for Hugepage support, not Transparent Hugepage support)
  2. Disabling transparent hugepages (THP) on Red Hat Enterprise Linux 6 is not taking effect.

Finally, here is what I believe is the reference article for THP support in Linux: Documentation/vm/transhuge.txt



 Comments   
Comment by Lauren Lewis (Inactive) [ 24/Feb/22 ]

We haven’t heard back from you for at least one calendar year, so this issue is being closed. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Comment by Ezekiel Keator [ 20/Apr/18 ]

This is still an issue and appears be a duplicate to SERVER-22257. This does cause some confusion when disabling THP per Red Hat documentation and still seeing the warning when connecting with MongoDB CLI.

Red Hat Documentation

When transparent_hugepage=never is appended to /boot/grub/grub.conf and the system is rebooted, the /sys/kernel/mm/transparent_hugepage/defrag option may still be enabled (ie: set to always). This can safely be ignored as THP is disabled, and THP defrag will not come into effect:

cat /sys/kernel/mm/transparent_hugepage/enabled
always [never]
 
cat /sys/kernel/mm/transparent_hugepage/defrag
[always] never

Generated at Thu Feb 08 03:49:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.