From 3538c78a8b639da6e26b07e16fe3fef6145a6bb6 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Thu, 10 Jul 2025 17:03:04 +0800 Subject: [PATCH] chore(server): use jemalloc to reduce RSS (#13134) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close CLOUD-237 #### PR Dependency Tree * **PR #13134** 👈 * **PR #13079** * **PR #13125** This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) --- .github/deployment/node/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/deployment/node/Dockerfile b/.github/deployment/node/Dockerfile index 353642f9a..9555c940c 100644 --- a/.github/deployment/node/Dockerfile +++ b/.github/deployment/node/Dockerfile @@ -7,7 +7,10 @@ COPY ./packages/frontend/apps/mobile/dist /app/static/mobile WORKDIR /app RUN apt-get update && \ - apt-get install -y --no-install-recommends openssl && \ + apt-get install -y --no-install-recommends openssl libjemalloc2 && \ rm -rf /var/lib/apt/lists/* +# Enable jemalloc by preloading the library +ENV LD_PRELOAD=libjemalloc.so.2 + CMD ["node", "./dist/main.js"]