• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting RAM Use

     
    • 0 Vote(s) - 0 Average

    RAM Use

    TriC4rboN8
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    #1
    2025-01-14, 07:33 AM (This post was last modified: 2025-01-14, 07:36 AM by TriC4rboN8. Edited 4 times in total.)
    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?

    [Image: 6F72q7G.png]

    Specs:
    - 2500K CPU
    - 32 GB DDR3
    - 512 GB SSD
    - Nvidia RTX 2060

    Thanks in advance.
    toytown
    Offline

    Member

    Posts: 78
    Threads: 2
    Joined: 2023 Jun
    Reputation: 3
    #2
    2025-01-14, 01:07 PM
    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.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #3
    2025-01-14, 02:21 PM
    Run this command.

    Code:
    sudo docker exec -it jellyfin env

    Is the "MALLOC_TRIM_THRESHOLD_" environment variable set? It should be set to 131072.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    TriC4rboN8
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    #4
    2025-01-27, 10:18 AM
    (2025-01-14, 02:21 PM)TheDreadPirate Wrote: Run this command.

    Code:
    sudo docker exec -it jellyfin env

    Is the "MALLOC_TRIM_THRESHOLD_" environment variable set?  It should be set to 131072.

    No, I don't have that variable. I will add it now and report back.

    Is that variable in megabytes? So, 131,072 megabytes?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #5
    2025-01-27, 01:16 PM (This post was last modified: 2025-01-27, 01:16 PM by TheDreadPirate.)
    Not sure the unit of measurement. But that is an important variable for triggering Jellyfin (or DOTNET?) to more aggressively trim memory usage.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    mattman
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2025 Jan
    Reputation: 0
    Country:United Kingdom
    #6
    2025-01-27, 09:15 PM
    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/sbinConfused-faceusr/local/binConfused-faceusr/sbinConfused-faceusr/binConfused-facesbinConfused-facebin
    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
    TriC4rboN8
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    #7
    2025-01-28, 06:08 AM (This post was last modified: 2025-01-28, 06:17 AM by TriC4rboN8. Edited 6 times in total.)
    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:

    [Image: 0gYh1CC.png]

    RAM use after environment variables applied:

    [Image: 2ZCX0Qi.png]


    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.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #8
    2025-01-28, 03:07 PM
    Do you have Jellystat installed?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode