Skip to content

Commit 51c1023

Browse files
authored
Merge pull request #723 from infosiftr/tcmalloc-rseq
Enable tcmalloc per-cpu caches
2 parents d3e7063 + 7bf2228 commit 51c1023

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

8.0-rc/Dockerfile

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.0/Dockerfile

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-linux.template

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ VOLUME /data/db /data/configdb
119119
# ensure that if running as custom user that "mongosh" has a valid "HOME"
120120
# https://github.com/docker-library/mongo/issues/524
121121
ENV HOME /data/db
122+
{{ if (env.rcVersion | tonumber >= 8) then ( -}}
123+
{{ # TODO remove this when it is no longer necessary: https://www.mongodb.com/docs/manual/administration/tcmalloc-performance/#enable-per-cpu-caches -}}
124+
125+
# ensure that glibc isn't using rseq so that google-tcmalloc can
126+
# https://www.mongodb.com/docs/manual/administration/tcmalloc-performance/#disable-glibc-rseq
127+
ENV GLIBC_TUNABLES glibc.pthread.rseq=0
128+
{{ ) else "" end -}}
122129

123130
COPY docker-entrypoint.sh /usr/local/bin/
124131
ENTRYPOINT ["docker-entrypoint.sh"]

0 commit comments

Comments
 (0)