Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Disable Transparent Huge Pages #119

Closed
gottfrois opened this issue Jan 6, 2016 · 6 comments
Closed

Disable Transparent Huge Pages #119

gottfrois opened this issue Jan 6, 2016 · 6 comments

Comments

@gottfrois
Copy link

Run docker run -it redis and you'll get the following warning message:

WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

I think it should be disabled in boot2docker but since you use a custom image if I understood correctly. Here is the boot2docker issue link: boot2docker/boot2docker#1083

@adrianfalleiro
Copy link
Contributor

Since dinghy runs on top of docker-machine it uses boot2docker on OS X.

I've run into this issue before, but resolved it using the fix suggested in the ticket you linked to, by running docker-machine ssh dinghy and making the necessary changes.

@gottfrois
Copy link
Author

Alright, thanks for the tip :)

@codekitchen
Copy link
Owner

Agreed, this should be tracked in docker-machine.

@gottfrois
Copy link
Author

Unfortunately I am not able to run the fix suggested:

docker@dinghy:~$ echo never > /sys/kernel/mm/transparent_hugepage/enabled
-sh: can't create /sys/kernel/mm/transparent_hugepage/enabled: Permission denied
docker@dinghy:~$ sudo echo never > /sys/kernel/mm/transparent_hugepage/enabled
-sh: can't create /sys/kernel/mm/transparent_hugepage/enabled: Permission denied

@codekitchen
Copy link
Owner

Your sudo is only applying to the echo command not the write to disk. You could use tee, or just run sudo -i to get a root shell.

@gottfrois
Copy link
Author

Thanks man :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants