It's bad form to just say "set this variable to this value" without any explanation about what that variable does and why that value helped.
Your configuration may not work or may be detrimental for others.
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
No spam posting.
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
No trolling.
Resources:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
It's bad form to just say "set this variable to this value" without any explanation about what that variable does and why that value helped.
Your configuration may not work or may be detrimental for others.
If you click the source linked, you can read through all the details.
The linked source also doesn’t explain what the env variable actually does or why it fixes anything.
PS: Reddit doesn't allow edit post titles, needed to repost
But this is Lemmy.
OP didn't update their repost bot to understand what it's reposting.
What does it do?
The value of this tunable is the minimum size (in bytes) of the top-most, releasable chunk in an arena that will trigger a system call in order to return memory to the system from that arena.
https://www.gnu.org/software/libc/manual/html_node/Memory-Allocation-Tunables.html
MALLOC_MMAP_THRESHOLD_
is an environment variable that sets the size threshold for using the mmap
system call to allocate memory instead of using the heap.
mmap
is used.What's the default value?
It could depend on your distro, official packaging (docker,Debian,Fedora) have MALLOC_TRIM_THRESHOLD_=131072
, but different distros could have (or not) ship with different settings.
Official settings for systemd https://github.com/jellyfin/jellyfin-packaging/blob/master/debian/conf/jellyfin
Thank you for posting this! I've been increasing the memory for my VM over and over and it was using 24GB RAM + 4GB swap. Hopefully this will let me reclaim some.
I've been having memory leak issues with my Jellyfin container, so I fired it up to see if it has a MALLOC variable set and it immediately crashed my server. Now waiting for the OOM killer to do its thing.
How well does jellyfin work on a rpi? How many simultaneous 1080p users with AVC\ACC media can it do? Active cooling?
Didn't try but depends on which RPI. 4? 5?
Also depends on the storage medium (SD? SSD?), assuming there's no transcoding.