Official-images: "transparent_hugepage" warnings using Docker automated image.

Created on 13 Mar 2015  路  4Comments  路  Source: docker-library/official-images

I'm running a few containers on my environment, using the automated image tagged "latest". However, the server starts with following warnings.

CONTROL [initandlisten]
CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
CONTROL [initandlisten] ** We suggest setting it to 'never'
CONTROL [initandlisten]
CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
CONTROL [initandlisten] ** We suggest setting it to 'never'
CONTROL [initandlisten]

Most helpful comment

I think you meant to file this on the mongo repo. :wink:

Regardless, setting these in the image can't really work because things in /sys are host-wid settings -- you'll have to do something like one of the following on your host system to enable this:

# echo never > /sys/kernel/mm/transparent_hugepage/enabled
# echo never > /sys/kernel/mm/transparent_hugepage/defrag

or

$ echo never | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
$ echo never | sudo tee /sys/kernel/mm/transparent_hugepage/defrag

All 4 comments

I think you meant to file this on the mongo repo. :wink:

Regardless, setting these in the image can't really work because things in /sys are host-wid settings -- you'll have to do something like one of the following on your host system to enable this:

# echo never > /sys/kernel/mm/transparent_hugepage/enabled
# echo never > /sys/kernel/mm/transparent_hugepage/defrag

or

$ echo never | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
$ echo never | sudo tee /sys/kernel/mm/transparent_hugepage/defrag

Sorry for that and thanks for your help! Problem was solved.

@tianon when go into the mongodb docker container and run the command, show error as below:
root@e8c1626b8c67:/# echo never > /sys/kernel/mm/transparent_hugepage/enabled
bash: /sys/kernel/mm/transparent_hugepage/enabled: Read-only file system

there is no command lsattr and chattr, how to set in docker container?

Please don't necro-post -- you need to set that on your host, not inside the container (it's a global value).

In the future, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SurajChande picture SurajChande  路  4Comments

federico-razzoli picture federico-razzoli  路  3Comments

orf picture orf  路  6Comments

mikethebeer picture mikethebeer  路  5Comments

sonicdoe picture sonicdoe  路  4Comments