Skip to content

Commit

Permalink
enable jemalloc (#277)
Browse files Browse the repository at this point in the history
- enable jemalloc
- check jemalloc  is actually used, 
  - extract sui binary from `ghcr.io/shinamicorp/sui:testnet-v1.38.0`
  - install libjemalloc-dev
  - set `LD_PRELOAD` to  `/usr/lib/x86_64-linux-gnu/libjemalloc.so`
- run `perf record -g --call-graph dwarf -F 4000 -o perf.data sui
--version`
  - run `perf script | grep jemalloc`, found jemalloc
  - unset `LD_PRELOAD`
- run `perf record -g --call-graph dwarf -F 4000 -o perf.data sui
--version`
  - run `perf script | grep jemalloc`, *not* found jemalloc


[sc-3882]
  • Loading branch information
shiqicao authored Dec 3, 2024
1 parent afe755c commit fcedea8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
ca-certificates \
libjemalloc2 \
procps \
&& \
rm -rf /var/lib/apt/lists/*

ENV LD_PRELOAD=libjemalloc.so.2

RUN adduser --uid 1000 --home /sui --gecos '' --disabled-password sui
WORKDIR /sui

Expand Down

0 comments on commit fcedea8

Please sign in to comment.