diff --git a/images/Dockerfile.bottlecap.alpine.compile b/images/Dockerfile.bottlecap.alpine.compile index 9858c5662..c7770ce73 100644 --- a/images/Dockerfile.bottlecap.alpine.compile +++ b/images/Dockerfile.bottlecap.alpine.compile @@ -24,6 +24,11 @@ ENV PATH="${PATH}:/root/.cargo/bin" # Build the binary ENV RUSTFLAGS="-Cpanic=abort" +# tikv-jemallocator uses the `_rjem_` symbol prefix, so the runtime MALLOC_CONF +# env var is ignored. Tune jemalloc at compile time instead: a single arena +# reduces metadata mapped at init and lowers RSS (the extension is not +# allocation-throughput-bound, so arena contention is a non-issue here). +ENV JEMALLOC_SYS_WITH_MALLOC_CONF="narenas:1" WORKDIR /tmp/dd/bottlecap RUN --mount=type=cache,target=/root/.cargo/git \ diff --git a/images/Dockerfile.bottlecap.compile b/images/Dockerfile.bottlecap.compile index 12a23f64b..f2007c6fd 100644 --- a/images/Dockerfile.bottlecap.compile +++ b/images/Dockerfile.bottlecap.compile @@ -23,6 +23,11 @@ ENV PATH="${PATH}:/root/.cargo/bin" # Build the binary ENV RUSTFLAGS="-Cpanic=abort" +# tikv-jemallocator uses the `_rjem_` symbol prefix, so the runtime MALLOC_CONF +# env var is ignored. Tune jemalloc at compile time instead: a single arena +# reduces metadata mapped at init and lowers RSS (the extension is not +# allocation-throughput-bound, so arena contention is a non-issue here). +ENV JEMALLOC_SYS_WITH_MALLOC_CONF="narenas:1" ENV AWS_LC_FIPS_SYS_CC=clang ENV AWS_LC_FIPS_SYS_CXX=clang++