google / google/tcmalloc

TCMalloc and Transparent Huge Pages

Open
#85 6 comments 7 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.3k
Forks
570
Avg merge
23h 43m
Merged PRs (30d)
172

Description

https://google.github.io/tcmalloc/tuning.html#system-level-optimizations says:

> TCMalloc heavily relies on Transparent Huge Pages (THP)

And requires that `/sys/kernel/mm/transparent_hugepage/enabled` be set to `always`.

This requirement is not ideal because:

1. The default for `/sys/kernel/mm/transparent_hugepage/enabled` is often `madvise`.
2. Some legacy applications exhibit performance degradation with `always` option.

I wonder why wouldn't TCMalloc explicitly request transparent huge pages using `madvise(..., MADV_HUGEPAGE)`, to not have this requirement, please?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.