![]() |
RAM Use - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Support (https://forum.jellyfin.org/f-support) +--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting) +--- Thread: RAM Use (/t-ram-use) |
RAM Use - TriC4rboN8 - 2025-01-14 Hello, I'm running Jellyfin from the linuxserver.io Docker container and am seeing crazy high RAM use. It is using 31 GB! This is just from one single stream being transcoded from 4K (65 GB file) to 720P with Nvidia hardware options. Is this normal? ![]() Specs: - 2500K CPU - 32 GB DDR3 - 512 GB SSD - Nvidia RTX 2060 Thanks in advance. RE: RAM Use - toytown - 2025-01-14 No this is not normal. I'm using the official docker image for 10.10.3 and when I start a 4K transcode (hardware accelerated for video and CPU for audio) i'm seeing a jump in ram usage to 2.36GB and then after transcoding has finished it drops back down to 1.96GB. Could you try disabling any unnecessary plugins and restarting the docker, see what the memory usage is before you start a playback session and during. Also please post the transcode log and maybe a 'top' to see what is using so much memory. RE: RAM Use - TheDreadPirate - 2025-01-14 Run this command. Code: sudo docker exec -it jellyfin env Is the "MALLOC_TRIM_THRESHOLD_" environment variable set? It should be set to 131072. RE: RAM Use - TriC4rboN8 - 2025-01-27 (2025-01-14, 02:21 PM)TheDreadPirate Wrote: Run this command. No, I don't have that variable. I will add it now and report back. Is that variable in megabytes? So, 131,072 megabytes? RE: RAM Use - TheDreadPirate - 2025-01-27 Not sure the unit of measurement. But that is an important variable for triggering Jellyfin (or DOTNET?) to more aggressively trim memory usage. RE: RAM Use - mattman - 2025-01-27 Hello All I'm getting a memory issue when running the JellyFin docker see below for my docker environments. as you can see MALLOC_TRIM_THRESHOLD_=131072 is set but I'm still having the issue with memory one of the messages I get a lot of is: - systemd-journald[392]: Under memory pressure, flushing caches. also I get this message. 2025-01-27T15:45:12.139659+00:00 matt-S3420GP kernel: message repeated 50 times: [ systemd-journald[382]: Under memory pressure, flushing caches.] 2025-01-27T16:52:36.788040+00:00 matt-S3420GP kernel: out_of_memory+0x103/0x350 2025-01-27T16:52:36.788112+00:00 matt-S3420GP kernel: Tasks state (memory values in pages): 2025-01-27T16:52:36.788769+00:00 matt-S3420GP kernel: Out of memory: Killed process 2930 (xdg-desktop-por) total-vm:2351216kB, anon-rss:1168kB, file-rss:440kB, shmem-rss:0kB, UID:1000 pgtables:836kB oom_score_adj:200 I only see this type of message when JellyFin container is running, even if it is just sitting idle not playing a video. Linux version is Linux x86_64 Ubuntu 24.04.1 LTS with a Kernel Version 6.8.0-51-generic Many thanks Matt PATH=/usr/local/sbin ![]() ![]() ![]() ![]() ![]() HOSTNAME=b0ceb88a95ba TERM=xterm PUID=1000 PGID=1000 JELLYFIN_PublishedServerUrl=http://xxx.xxx.xxx.xxx NVIDIA_VISIBLE_DEVICES=GPU-2cf759aa-dc57-9969-335c-003ce3b98173 HEALTHCHECK_URL=http://localhost:8096/health DEBIAN_FRONTEND=noninteractive LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US:en JELLYFIN_DATA_DIR=/config JELLYFIN_CACHE_DIR=/cache JELLYFIN_CONFIG_DIR=/config/config JELLYFIN_LOG_DIR=/config/log JELLYFIN_WEB_DIR=/jellyfin/jellyfin-web JELLYFIN_FFMPEG=/usr/lib/jellyfin-ffmpeg/ffmpeg XDG_CACHE_HOME=/cache MALLOC_TRIM_THRESHOLD_=131072 NVIDIA_DRIVER_CAPABILITIES=compute,video,utility HOME=/root RE: RAM Use - TriC4rboN8 - 2025-01-28 Ok, so I ended up rebuilding the whole server I was using from an old gaming PC. The old system would start slowing down and stop allowing video playback after a day or two, needing a restart. New system does not seem to have that issue and is and much faster. New specs: - 8700K CPU - 64 GB DDR4 - 2x 512 GB SATA SSD - 512 GB NVME SSD for cache - Nvidia RTX 2060 - Linuxserver.io Docker Image Here was my RAM use before those environment variables: ![]() RAM use after environment variables applied: ![]() Video stream startup and seeking are insanely fast now, but RAM use is still nuts and using all 61 GB of RAM. That being said, this is from streaming 3 different 4K remux movies (~65 GB each file) transcoded and tone mapped to 20 mbit 1080P. All three streams have nearly 200 FPS transcoding framerate, so I can't complain. I will continue running the server like this and see how things go.....if it starts interfering with other docker container resources I will check back. RE: RAM Use - TheDreadPirate - 2025-01-28 Do you have Jellystat installed? |