Properly support libjemalloc multiarch

This commit is contained in:
Joshua M. Boniface
2025-06-14 22:31:43 -04:00
parent 85f3482551
commit 90bf1c632a
2 changed files with 6 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ JELLYFIN_WEB_OPT="--webdir=/usr/share/jellyfin/web"
JELLYFIN_FFMPEG_OPT="--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"
# Use jemalloc2 for improved RAM usage (#11588)
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
LD_PRELOAD=/usr/lib/jellyfin/libjemalloc.so
# Disable glibc dynamic heap adjustment
MALLOC_TRIM_THRESHOLD_=131072

View File

@@ -19,6 +19,8 @@ CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME}
LOGDATA=${JELLYFIN_LOG_DIRECTORY-/var/log/$NAME}
CACHEDATA=${JELLYFIN_CACHE_DIRECTORY-/var/cache/$NAME}
MULTIARCH_ARCH="$( dpkg-architecture -qDEB_HOST_MULTIARCH )"
case "$1" in
configure)
# create jellyfin group if it does not exist
@@ -50,6 +52,9 @@ case "$1" in
fi
done
# Install libjemalloc.so symlink into /usr/lib/jellyfin
ln -sf /usr/lib/${MULTIARCH_ARCH}/libjemalloc.so.2 /usr/lib/jellyfin/libjemalloc.so
# Install jellyfin symlink into /usr/bin
ln -sf /usr/lib/jellyfin/bin/jellyfin /usr/bin/jellyfin