Enable jemalloc2 for our pods (#6823)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-10-07 16:20:31 +07:00 committed by GitHub
parent db9af92f1d
commit f929acfe29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 101 additions and 8 deletions

View File

@ -6,6 +6,7 @@ RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mong
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true

View File

@ -4,6 +4,14 @@ FROM node:20
WORKDIR /usr/src/app
RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
EXPOSE 3000

View File

@ -6,6 +6,7 @@ RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mong
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true

View File

@ -7,6 +7,7 @@ RUN npm install --ignore-scripts=false --verbose sharp@v0.32.6 bufferutil utf-8-
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true

View File

@ -5,6 +5,7 @@ RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mong
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true

View File

@ -6,6 +6,7 @@ RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mong
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true

View File

@ -1,8 +1,15 @@
FROM node:20-alpine
FROM node:20
WORKDIR /usr/src/app
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
EXPOSE 3078

View File

@ -3,6 +3,13 @@ FROM node:20
WORKDIR /usr/src/app
RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
COPY assets/avatar.png ./

View File

@ -3,6 +3,13 @@ FROM node:20
WORKDIR /usr/src/app
RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
EXPOSE 4007

View File

@ -1,8 +1,15 @@
FROM node:20-alpine
FROM node:20
WORKDIR /usr/src/app
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
EXPOSE 8095

View File

@ -7,6 +7,7 @@ RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mong
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true

View File

@ -1,8 +1,15 @@
FROM node:20-alpine
FROM node:20
WORKDIR /usr/src/app
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
EXPOSE 8087

View File

@ -4,6 +4,13 @@ FROM node:20
WORKDIR /usr/src/app
RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
EXPOSE 8096

View File

@ -1,6 +1,7 @@
FROM node:20-alpine AS runtime
FROM node:20 AS runtime
RUN apk upgrade --update && apk add \
RUN apt-get update
RUN apt-get install -y \
coreutils \
antiword \
poppler-utils \
@ -9,6 +10,14 @@ RUN apk upgrade --update && apk add \
ENV NODE_ENV=production
WORKDIR /usr/src/app
RUN npm install --ignore-scripts=false --verbose sharp@v0.30.2 pdfjs-dist@v2.12.313 --unsafe-perm
RUN apt-get update
RUN apt-get install -y libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
EXPOSE 4004
CMD [ "node", "./bundle.js" ]

View File

@ -1,7 +1,14 @@
FROM node:20-alpine
FROM node:20
WORKDIR /usr/src/app
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
EXPOSE 8089

View File

@ -6,6 +6,13 @@ WORKDIR /usr/src/app
RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
CMD [ "dumb-init", "node", "bundle.js" ]

View File

@ -1,7 +1,14 @@
FROM node:20-alpine
FROM node:20
WORKDIR /usr/src/app
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
EXPOSE 4020

View File

@ -1,8 +1,15 @@
FROM node:20-alpine
FROM node:20
WORKDIR /usr/src/app
RUN apt-get update
RUN apt-get install libjemalloc2
RUN apt-get clean
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
EXPOSE 8086