• 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 Excessive RAM consumption

    Pages (9): 1 2 3 4 5 … 9 Next »
     

     
    • 0 Vote(s) - 0 Average

    Excessive RAM consumption

    duplikk
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Feb
    Reputation: 0
    #1
    2024-02-27, 07:58 PM
    Jellyfin at idle consumes a crazy amount of RAM. After 2 weeks uptime I have seen it climb to 5GB +. I've started to restart the container weekly to prevent this from happening.

    Plex even while being used uses 500mb max.

    [Image: SrzoGSA.png]
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-02-27, 09:45 PM (This post was last modified: 2024-02-27, 09:45 PM by TheDreadPirate.)
    This is likely due to Jellyfin's use of .Net, which caches aggressively to speed up Jellyfin's responsiveness. Unused memory is wasted memory. If you aren't running out of memory, I wouldn't be concerned and just leave it alone.

    Which image are you using? The official jellyfin/jellyfin image or LSIO's image?
    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]
    duplikk
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Feb
    Reputation: 0
    #3
    2024-02-28, 01:22 PM (This post was last modified: 2024-02-28, 01:25 PM by duplikk. Edited 2 times in total.)
    (2024-02-27, 09:45 PM)TheDreadPirate Wrote: This is likely due to Jellyfin's use of .Net, which caches aggressively to speed up Jellyfin's responsiveness.  Unused memory is wasted memory.  If you aren't running out of memory, I wouldn't be concerned and just leave it alone.

    Which image are you using?  The official jellyfin/jellyfin image or LSIO's image?

    binhex/arch-jellyfin

    I would like to use the memory for something else. Jellyfin keeps hogging all of it and causing OOM.

    "Unusued memory is wasted memory" is a terrible mantra. Use what you need instead of making unoptimized software. Plex uses a fraction of what Jellyfin does, and is frankly still more responsive.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-02-28, 05:03 PM
    Most of the memory jellyfin uses is cache. Memory used for caching and reserved memory for applications and application data behave significantly differently. If another app needs more memory, the cached memory will be immediately released to the other application. Most dashboards, like the screenshot you provided, do not distinguish between reserved memory and cache.
    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]
    34626
    Offline

    Member

    Posts: 173
    Threads: 36
    Joined: 2023 Jul
    Reputation: 0
    Country:Denmark
    #5
    2024-02-28, 05:23 PM
    You have 32 GB of ram, what else would you use them on, that requires over 25 GB ram?
    Was the 5 GB ram usage while it had been transcoding?

    Jellyfin might use more ram, but at least its Open Source and respects it's users privacy and then it's free.
    Serv: N5105 - 32GB RAM, 1 WD Red SA500 2TB, 2 8TB, 2 4TB WD Red Plus, LC-35U3-C-HUB
    OS: Debian
    Clients: Pi4 with LibreELEC + JellyCon and Jellyfin Media Player
    Network: 2 TP-Link AX23, OpenWRT mesh 802.11s and 1 Gbit
    Efficient_Good_5784
    Offline

    Community Moderator

    Posts: 1,167
    Threads: 3
    Joined: 2023 Jun
    Reputation: 50
    #6
    2024-02-28, 05:52 PM (This post was last modified: 2024-02-28, 05:56 PM by Efficient_Good_5784. Edited 2 times in total.)
    (2024-02-28, 01:22 PM)duplikk Wrote: I would like to use the memory for something else.
    As the @TheDreadPirate states, cached memory will be the first to be overwritten when a new program needs to use some ram. You're GUI screenshot doesn't show what is used and what is cached.

    Take a look at this screenshot of my Synology's ram usage: https://imgur.com/fkl7Y4j

    You can see that despite only having 150MB free out of 8GB, my ram utilization is only 13%.
    I have 6.5GB used just for caching purposes by either the OS or applications running on the NAS.
    If it wasn't for this cached data, the NAS would need to keep loading all that data from the slow HDDs each time.
    The cached data doesn't count as used data (towards the utilization) since it's there with the expectation that it's the first to go when new programs need ram.

    Windows even does this too. Look at this picture of my Windows computer's RAM being used at 37% full: https://imgur.com/UIxxr46
    You'll notice that despite 20.4GB being used as cache (out of the 32GB), I still have over 20GB free to use for anything else.
    Furthermore, this screenshot shows there's no free memory at all in the memory composition bar (memory that has nothing written to it). It's all either used or cached, but Windows doesn't say I'm out of memory.

    (2024-02-28, 01:22 PM)duplikk Wrote: "Unusued memory is wasted memory" is a terrible mantra. Use what you need instead of making unoptimized software. Plex uses a fraction of what Jellyfin does, and is frankly still more responsive.
    Jellyfin already does. If you find a memory leak (non-cache memory not being released after it's no longer needed), that's a bug and should be reported.
    A lot of people don't understand that memory can be used for caching purposes, and with some GUIs not showing you what part of RAM is cached data, people tend to think high RAM utilization is bad.

    You payed for the ram, why not use it all? It's literally in the name of the hardware, Random Access Memory.
    It's meant to collect random bits of data to make data processing faster for the CPU. If it wasn't for RAM, you would have to rely on the slower disks to reload commonly used data.
    WiseWeasel
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2024 Feb
    Reputation: 0
    Country:United States
    #7
    2024-02-29, 12:31 AM
    Doesn't look like the binhex/arch-jellyfin image includes the MALLOC_TRIM_THRESHOLD_ environment variable.

    https://github.com/binhex/arch-jellyfin/...erfile#L36

    The official image includes the environment variable that drastically reduced RAM usage for me. Went from over 10G after a few weeks of running to ~700M. 

    https://github.com/jellyfin/jellyfin/pull/10454


    podman image inspect --format '{{ index (index .Config.Env) 12 }}' docker.io/jellyfin/jellyfin:10.8.13-1


    output:


    MALLOC_TRIM_THRESHOLD_=131072
    Petitgnoll6
    Offline

    Junior Member

    Posts: 3
    Threads: 0
    Joined: 2024 Apr
    Reputation: 0
    #8
    2024-04-14, 10:41 AM
    Hi guys, sorry for the necro thread.
    And my question may not be the place but I couldn't find the answer on google.

    I'm on LSIO image and I have much memory usage and I was wondering if LSIO image had the MALLOC fix.

    I did not see it in https://github.com/linuxserver/docker-je...Dockerfile but I don't know if it's the right place to look for it.

    If anyone had the answer, it would be great !

    Thanks
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #9
    2024-04-14, 03:26 PM
    In my experience with LSIO's image, the memory consumption on their current versions comes from ffmpeg. For some reason the LSIO version does not limit the number of ffmpeg processes during a library scan whereas the official image limits ffmpeg to 2x your thread count.

    Is that what is going on here? Or do you have non-ffmpeg related memory consumption issues?
    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]
    Petitgnoll6
    Offline

    Junior Member

    Posts: 3
    Threads: 0
    Joined: 2024 Apr
    Reputation: 0
    #10
    2024-04-16, 10:43 AM
    I actually don't know haha ! How could I check if it's ffmepg related or not ?

    The ram amount (and swap too) increases over time, I guess it could be ram caching (the server runs fine) but that's why I wanted to know if the malloc fix was in LSIO (to know if it's only caching or if it could be a leak).

    Thanks for you help
    Pages (9): 1 2 3 4 5 … 9 Next »
     

    « 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