Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: setup jemalloc page size to 64k on arm #72

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ RUN curl -fL -Lo redis-${REDIS_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}/redis-${RED

WORKDIR /tmp/redis-${REDIS_VERSION}

RUN make && \
make install BUILD_TLS=yes
RUN arch="$(uname -m)"; \
extraJemallocConfigureFlags="--with-lg-page=16"; \
if [ "$arch" = "aarch64" ] || [ "$arch" = "arm64" ]; then \
sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' /tmp/redis-${REDIS_VERSION}/deps/Makefile; \
fi; \
export BUILD_TLS=yes; \
make all; \
make install

FROM alpine:3.15

Expand Down
10 changes: 8 additions & 2 deletions Dockerfile.sentinel
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ WORKDIR /tmp

RUN curl -fL -Lo redis-${REDIS_SENTINEL_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}/redis-${REDIS_SENTINEL_VERSION}.tar.gz && \
tar xvzf redis-${REDIS_SENTINEL_VERSION}.tar.gz && \
make -C redis-${REDIS_SENTINEL_VERSION} && \
make -C redis-${REDIS_SENTINEL_VERSION} install BUILD_TLS=yes
arch="$(uname -m)"; \
extraJemallocConfigureFlags="--with-lg-page=16"; \
if [ "$arch" = "aarch64" ] || [ "$arch" = "arm64" ]; then \
sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' /tmp/redis-${REDIS_SENTINEL_VERSION}/deps/Makefile; \
fi; \
export BUILD_TLS=yes; \
make -C redis-${REDIS_SENTINEL_VERSION} all; \
make -C redis-${REDIS_SENTINEL_VERSION} install

FROM alpine:3.15

Expand Down
Loading