Skip to content

Commit

Permalink
Use jemalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
ujh committed Dec 29, 2024
1 parent 8cc8c3a commit 4576526
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y curl libjemalloc2 libvips lsb-release gnupg2 && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Set up jemalloc for better memory management
RUN ln -s /usr/lib/*-linux-gnu/libjemalloc.so.2 /usr/lib/libjemalloc.so.2
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
ENV MALLOC_CONF="dirty_decay_ms:1000,narenas:2,background_thread:true"

# Install Postgres 16, so that schema dumping works
RUN echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
# Trust the PGDG gpg key
Expand Down

0 comments on commit 4576526

Please sign in to comment.