-
Notifications
You must be signed in to change notification settings - Fork 2
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
enable jemalloc #277
enable jemalloc #277
Conversation
660cc9e
to
518441b
Compare
518441b
to
cebaaf3
Compare
Dockerfile
Outdated
procps \ | ||
&& \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN ln -s /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/libjemalloc.so /usr/lib/libjemalloc.so | ||
|
||
ENV LD_PRELOAD=/usr/lib/libjemalloc.so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you can simply install libjemalloc2
and do LD_PRELOAD=libjemalloc.so.2
. Then you don't need dpkg-dev
nor the manual symlink.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directly installing libjemalloc2 still installed under x86_64-linux-gnu
> sudo apt-get install libjemalloc2
> dpkg-query -L libjemalloc2
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
/usr/share
/usr/share/doc
/usr/share/doc/libjemalloc2
/usr/share/doc/libjemalloc2/README
/usr/share/doc/libjemalloc2/changelog.Debian.gz
/usr/share/doc/libjemalloc2/copyright
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I understand, but the path prefix is auto inferred based on the current platform so you just need the relative path.
ghcr.io/shinamicorp/sui:testnet-v1.38.0
LD_PRELOAD
to/usr/lib/x86_64-linux-gnu/libjemalloc.so
perf record -g --call-graph dwarf -F 4000 -o perf.data sui --version
perf script | grep jemalloc
, found jemallocLD_PRELOAD
perf record -g --call-graph dwarf -F 4000 -o perf.data sui --version
perf script | grep jemalloc
, not found jemalloc[sc-3882]