[SERVER-18113] Packages should disable transparent hugepages Created: 18/Apr/15 Updated: 06/Feb/23 Resolved: 06/Feb/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Packaging |
| Affects Version/s: | 3.0.0, 3.0.1, 3.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ben McCann | Assignee: | [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive) |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | initscript, sdp-backlog-purge | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Server Development Platform
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: | Install MongoDB 3.0.2 and run with WiredTiger cat /var/log/mongodb/mongodb.log Look for warnings in the log:
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
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:
|
| Comments |
| Comment by Iryna Zhuravlova [ 16/Nov/22 ] |
|
After a careful backlog refinement, the team decided to close this ticket because of its low priority and limited resource capacity. If you believe that this ticket requires additional attention from the team and should be re-opened, feel free to change the status to "Needs Scheduling" and ping me or @alexander.neben |
| Comment by Ramon Fernandez Marina [ 22/May/15 ] |
|
The jury is still out on whether it's a good idea for MongoDB init scripts to make system-wide changes that may affect other parts of the system, or whether it's better to leave it up to the users to decide what system-wide settings are better for their deployments. While the former approach may seem more convenient, the latter one is less intrusive and closer to the principle of least surprise. This ticket remains open to evaluate the benefits of both approaches. |
| Comment by Ben McCann [ 21/May/15 ] |
|
The warnings are unsettling especially for folks not very familiar transparent hugepages. I'm curious what people think about the solution posted by Kevin Pulo on https://jira.mongodb.org/browse/DOCS-5330 |
| Comment by Kevin Pulo [ 05/May/15 ] |
|
The THP-related MongoDB documentation is available at http://docs.mongodb.org/manual/reference/transparent-huge-pages/. However, you should also note |
| Comment by Ramon Fernandez Marina [ 19/Apr/15 ] |
|
chengas123, it's not uncommon to disable THP at the end of init (e.g.: /etc/rc.local) even after mongod has started; you'll get a warning in the logs but mongod won't use THP. I believe the reason toku disables THP in the init scripts is because it will refuse to start if THP are enabled, which is not the case for mongod. |
| Comment by Ben McCann [ 18/Apr/15 ] |
|
Hmm, I sort of see what you're saying. I'm having a hard time figuring out how to do that though. I spent hours trying to make this setting persist across reboots on an EC2 instance and couldn't figure out how to do that. Part of the problem is that many of the ways I've seen suggested for setting this take effect after init and so you'll still get this warning with each boot when MongoDB starts. We were using TokuMX on some servers and I notice that they do this in their init script, which was the only way I could figure out how to fix the warning. If we decide that it shouldn't be added to the init script, it would at least be nice to document a way of setting this that will solve the problem such that the warning no longer appears in our logs. |
| Comment by Ernie Hershey [ 18/Apr/15 ] |
|
I don't think we want to make changes like this in the init script that would have system-wide impact beyond mongodb processes and override the setting being made elsewhere. It might be a good idea later to optionally do this at package installation time, but for now we leave any system-wide changes like this or filesystem readahead settings up to users to tune themselves based on suggested settings in our documentation. If it were possible to set this on a per-process basis, like ulimits and numa settings, it would make more sense in the init script. |