[SERVER-17418] After disabling transparent huge pages via rc.local mongodb shell warns about THP being enabled Created: 27/Feb/15  Updated: 16/Jun/15  Resolved: 27/Feb/15

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

Type: Bug Priority: Trivial - P5
Reporter: Paul Gaynor [X] Assignee: Ramon Fernandez Marina
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-17522 THP startup warnings can become stale Closed
Related
related to DOCS-5330 Using /etc/rc.local to disable THP re... Closed
is related to DOCS-2131 Improve Linux transparent hugepages d... Closed
Operating System: ALL
Participants:

 Description   

When disabling transparent huge pages on server start up via /etc/rc.local warnings about THP being enabled are presented when starting the mongo shell and in the mongodb.log.

Because commands in rc.local are executed at the end of the multiuser run level which mongodb starts the mongo server reports that transparent huge pages are still enabled even though they had been disabled.

$ tail /var/log/mongodb/mongodb.log

          • SERVER RESTARTED *****
            ...
            2015-02-27T13:32:22.946-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
            2015-02-27T13:32:22.946-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
            2015-02-27T13:32:22.946-0800 I CONTROL [initandlisten]
            2015-02-27T13:32:22.946-0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
            2015-02-27T13:32:22.946-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'

$ cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]



 Comments   
Comment by Ramon Fernandez Marina [ 27/Feb/15 ]

Pablosquared, from your description it seems that when mongod starts THP are still enabled, hence the warning – mongod can't possibly know that rc.local will disable them later. The solution is to disable THP before mongod is run.

Note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion like this one please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like this involving more discussion would be best posted on the mongodb-user group.

Regards,
Ramón.

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