Jellyfin Forum
Jellyfin eats all ram - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Jellyfin eats all ram (/t-jellyfin-eats-all-ram)



Jellyfin eats all ram - zero0 - 2024-08-05

Hell,
I'm trying to scan my new library and Jellyfin started eating all the ram and can'¡t finish. I'm running it in a Linux with 4g of ram.
¿What I'm doing wrong?

[Image: imagen.png]


RE: Jellyfin eats all ram - Fate - 2024-08-05

What kind of CPU are you using?

You also cutoff which process is using the CPU....
If you press "C" you should be able to see the whole commandline that is running

Trickplay can be hard on a weak CPU, so try disable trickplay image generation in libary settings.


RE: Jellyfin eats all ram - TheDreadPirate - 2024-08-05

A lot of ffmpeg and ffprobe processes will spawn during a large library scan. Go to Dashboard > General and at the bottom of that panel will be two settings to limit the number of processes a library scan will spawn. Try setting that to 4 or 8 for each.


RE: Jellyfin eats all ram - Efficient_Good_5784 - 2024-08-05

What Jellyfin version are you running?

I would remove the 4GB ram limit for Jellyfin as it's ram heavy and may not be enough for the tasks it's running on the server currently.


RE: Jellyfin eats all ram - zero0 - 2024-08-06

I'm running 10.9.9 and after setting the Parallel library scan tasks limit to 4 I'm having the same problem.
Trickplay is disabled and I think the problem is that ffmpeg uses 1G each thread
[Image: imagen.png]
Can I limit the maximum memory used bt ffmpeg?
Any help would be appreciated.


RE: Jellyfin eats all ram - Fate - 2024-08-06

(2024-08-06, 06:42 AM)zero0 Wrote: I'm running 10.9.9 and after setting the Parallel library scan tasks limit to 4 I'm having the same problem.
Trickplay is disabled and I think the problem is that ffmpeg uses 1G each thread
[Image: imagen.png]
Can I limit the maximum memory used bt ffmpeg?
Any help would be appreciated.

You can not really limit the RAM ffmpeg will use. It will use the Ram necessary to do the job, not more not less.

Also it is not using 1gig each thread. Your own screenshot shows that.
The threads use 5.8% , 2.7% , 8.6% an 12.3% of your memory.
So combined 29,4% of your memory. If you have 4gig that would be 1205MB combined.

How about you share a screenshot of atop without any cover so we can see what your system is doing?


RE: Jellyfin eats all ram - 34626 - 2024-08-06

Please share logs of Jellyfin with pastabin.com - Remember to create a free account so you can delete it afterwards.

Are you using a docker image?


RE: Jellyfin eats all ram - Partition - 2024-08-06

Iy can confirm that it's a problem since 10.9.7.
My library/schedules barely changed and when the daily schedule launches my library tasks from 00:00 to 06:00AM the docker PIDs change from 24ish to 1300ish in a short timespan ( ~ 30 to 60 minutes ) and accumulate at least 5 times the normal amount of RAM compared to 10.9.6.
My normal RAM usage is 2 to 4 GB in 10.9.6 → full 16GB Ram and 100% cpu usage of the system until it "crashes" the system after 10.9.7. 
Manual launched tasks usually only takes 1 to 3 minutes except themerr which takes 10 minutes to finish.

Hardware:
8 cores of Intel 14900K
16GB RAM
Official docker image


Picture:

[Image: ZjQHXxC.jpeg]

Phase 1: 00:00 to 02:00: trickplay, intro/outro detection, scan new boxsets → almost no hardware load
Phase 2: 02:00 to 04:00: extract chapter pictures, download missing subtitles, extract subtitles, playback backup → higher cpu utilisation, constant memory increase 
Phase 3: 04:00 to 11:00: library scan, all maintenance tasks → cpu overload, still constant memory increase untill all available memory is used. I had to restart the machine to solve the problem.

Logs: 
Jellyfin logs - 6.8.24 - Pastebin.com


RE: Jellyfin eats all ram - TheDreadPirate - 2024-08-06

(2024-08-06, 09:24 PM)Partition Wrote: Iy can confirm that it's a problem since 10.9.7.
My library/schedules barely changed and when the daily schedule launches my library tasks from 00:00 to 06:00AM the docker PIDs change from 24ish to 1300ish in a short timespan ( ~ 30 to 60 minutes ) and accumulate at least 5 times the normal amount of RAM compared to 10.9.6.
My normal RAM usage is 2 to 4 GB in 10.9.6 → full 16GB Ram and 100% cpu usage of the system until it "crashes" the system after 10.9.7. 
Manual launched tasks usually only takes 1 to 3 minutes except themerr which takes 10 minutes to finish.

Hardware:
8 cores of Intel 14900K
16GB RAM
Official docker image


Picture:

[Image: ZjQHXxC.jpeg]

Phase 1: 00:00 to 02:00: trickplay, intro/outro detection, scan new boxsets → almost no hardware load
Phase 2: 02:00 to 04:00: extract chapter pictures, download missing subtitles, extract subtitles, playback backup → higher cpu utilisation, constant memory increase 
Phase 3: 04:00 to 11:00: library scan, all maintenance tasks → cpu overload, still constant memory increase untill all available memory is used. I had to restart the machine to solve the problem.

Logs: 
Jellyfin logs - 6.8.24 - Pastebin.com

Have you tried the solution I suggested above?

(2024-08-05, 06:40 PM)TheDreadPirate Wrote: A lot of ffmpeg and ffprobe processes will spawn during a large library scan.  Go to Dashboard > General and at the bottom of that panel will be two settings to limit the number of processes a library scan will spawn.  Try setting that to 4 or 8 for each.