Jellyfin Forum
Unused Jellyfin uses a lot of resources - 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: Unused Jellyfin uses a lot of resources (/t-unused-jellyfin-uses-a-lot-of-resources)



Unused Jellyfin uses a lot of resources - penguin-matt - 2024-05-06

Jellyfin runs within docker on ubuntu 22.04. Everything runs fine but occasionally my system load spikes up dramatically and becomes unusable. I do not think that Jellyfin is the sole contributor to this spiking but when looking at the system using htop I can see several jellyfin processes using a significant amount of memory and CPU. While I've got jellyfin running permanently I am still using plex so jellyfin should just be idling and not use significant resource.

Maybe it's some kind of scheduled job in jellyfin but the processes which I see are all the same

/usr/bin/jellyfin --ffmpeg=/usr/bin/jellyfin-ffmpeg/ffmpeg

I'm wondering if there is something I can do about this or diagnose further what might be causing this?

I think the high load is actually caused by Plex but that's another investigation and I'm trying to get to the bottom of everything


RE: Unused Jellyfin uses a lot of resources - TheDreadPirate - 2024-05-06

Which docker image are you using?


RE: Unused Jellyfin uses a lot of resources - penguin-matt - 2024-05-06

(2024-05-06, 10:11 PM)TheDreadPirate Wrote: Which docker image are you using?

The linuxserver one.

I actually actually might have to recant my suspicion of Plex being the cause here. My load is less than 1, I start the jellyfin container and it spikes up, I stop it and it goes back under 1 again so the culprit may be jellyfin after all.


RE: Unused Jellyfin uses a lot of resources - Kevin Nord - 2024-05-07

(2024-05-06, 09:55 PM)penguin-matt Wrote: Jellyfin runs within docker on ubuntu 22.04. Everything runs fine but occasionally my system load spikes up dramatically and becomes unusable. I do not think that Jellyfin is the sole contributor to this spiking but when looking at the system using htop I can see several jellyfin processes using a significant amount of memory and CPU. While I've got jellyfin running permanently I am still using plex so jellyfin should just be idling and not use significant resource.

Maybe it's some kind of scheduled job in jellyfin but the processes which I see are all the same

/usr/bin/jellyfin --ffmpeg=/usr/bin/jellyfin-ffmpeg/ffmpeg

I'm wondering if there is something I can do about this or diagnose further what might be causing this?

I think the high load is actually caused by Plex but that's another investigation and I'm trying to get to the bottom of everything

Check scheduled tasks in your admin dashboard. Depending on the size of your collection and how you add media, Jellyfin can get hammered by requesting metadata and making updates to the db. Unfortunately, the default time for the scheduled tasks is the same time Jellyfin was initialized, so if you set it up at 1300 it'll run tasks at 1300 every day. I recommend scheduling them for a sane hour when you have minimal users.


RE: Unused Jellyfin uses a lot of resources - TheDreadPirate - 2024-05-07

The Linuxserver Jellyfin docker image does not properly restrict the number of ffmpeg processes that spawn during a scan. The official jellyfin/jellyfin image, and bare metal jellyfin, restricts ffmpeg to 2x your thread count. Whereas I've documented hundreds of ffmpeg processes spawning during a library scan when testing the LSIO image.