This is an automated archive made by the Lemmit Bot.
The original was posted on /r/selfhosted by /u/American_Jesus on 2025-03-30 14:02:43+00:00.
Many users reported high memory/RAM usage, some 8GB+.
In my case gone from 1.5GB+ to 400MB or less on Raspberry Pi 4.
Adding MALLOC_TRIM_THRESHOLD_=100000
can make a big difference.
With Docker:
Add to your docker-compose.yml and docker compose down && docker compose up -d
`...
environment:
- MALLOC_TRIM_THRESHOLD_=100000
...`
With systemd:
Edit /etc/default/jellyfin
change the value of MALLOC_TRIM_THRESHOLD_
and restart the service
Disable glibc dynamic heap adjustment
=====================================
MALLOC*TRIM\_THRESHOLD*=100000
Source:
Official docker,Debian,Fedora packages already contain MALLOC_TRIM_THRESHOLD_
.
Not present on some docker images like linuxserver/jellyfin
PS: Reddit doesn't allow edit post titles, needed to repost