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

[CELEBORN-1893] Support jemalloc.so.2 #3131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion sbin/load-celeborn-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,19 @@ fi
maybe_enable_jemalloc() {
if [ "${CELEBORN_PREFER_JEMALLOC:-false}" == "true" ]; then
JEMALLOC_PATH="${CELEBORN_JEMALLOC_PATH:-/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so}"
JEMALLOC2_PATH="/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
JEMALLOC2_PATH="/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2"
JEMALLOC2_PATH="${CELEBORN_JEMALLOC_PATH:-/usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2}"

JEMALLOC_FALLBACK="/usr/lib/x86_64-linux-gnu/libjemalloc.so"
if [ -f "$JEMALLOC_PATH" ]; then
export LD_PRELOAD="$LD_PRELOAD:$JEMALLOC_PATH"
elif [ -f "$JEMALLOC2_PATH" ]; then
export LD_PRELOAD="$LD_PRELOAD:$JEMALLOC2_PATH"
elif [ -f "$JEMALLOC_FALLBACK" ]; then
export LD_PRELOAD="$LD_PRELOAD:$JEMALLOC_FALLBACK"
else
if [ "$JEMALLOC_PATH" == "$JEMALLOC_FALLBACK" ]; then
MSG_PATH="$JEMALLOC_PATH"
else
MSG_PATH="$JEMALLOC_PATH and $JEMALLOC_FALLBACK"
MSG_PATH="$JEMALLOC_PATH and $JEMALLOC2_PATH and $JEMALLOC_FALLBACK"
fi
echo "WARNING: attempted to load jemalloc from $MSG_PATH but the library couldn't be found. glibc will be used instead."
fi
Expand Down
Loading