Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable automatic transparent hugepages #1880

Merged
merged 1 commit into from
Mar 5, 2019
Merged

Disable automatic transparent hugepages #1880

merged 1 commit into from
Mar 5, 2019

Conversation

aermakov-zalando
Copy link
Contributor

Transparent hugepages are problematic and the common recommendation is to disable them. Setting the corresponding flag to madvise disables the fully-automatic behaviour but allows applications to opt-in by using mmap.

Signed-off-by: Alexey Ermakov <alexey.ermakov@zalando.de>
@mdedetrich
Copy link

mdedetrich commented Mar 5, 2019

For reference, I became aware of this when experiencing occasional severe latency spikes in redis, latency doctor in redis gave this as a first message

I have a few advices for you:

I detected a non zero amount of anonymous huge pages used by your process. This creates very serious latency events in different conditions, especially when Redis is persisting on disk. To disable THP support use the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled', make sure to also add it into /etc/rc.local so that the command will be executed again after a reboot. Note that even if you have already disabled THP, you still need to restart the Redis process to get rid of the huge pages already created.

@aermakov-zalando
Copy link
Contributor Author

👍

1 similar comment
@szuecs
Copy link
Member

szuecs commented Mar 5, 2019

👍

@szuecs szuecs merged commit 63910ea into dev Mar 5, 2019
@szuecs szuecs deleted the hugepages branch March 5, 2019 17:34
@szuecs
Copy link
Member

szuecs commented Mar 5, 2019

Thanks @mdedetrich

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

Successfully merging this pull request may close these issues.

3 participants