Jellyfin Forum
High CPU Usage - 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: High CPU Usage (/t-high-cpu-usage--5284)

Pages: 1 2


High CPU Usage - AyaanMAG - 2024-04-06

Hello, I'm running Jellyfin on my Raspberry Pi 5 and I haven't had any issues until the past few days when the scanning media library never completes and trying to stop it keeps it stuck at stopping and the only way to get rid of it is by restarting the server which starts the media scanning again which remains stuck, however it picks up all the newly added media, so I didn't bother finding a fix until I noticed I couldn't play what I wanted to and even the UI I was slow to load, after I got home to check what was up, the CPU usage for all 4 cores was maxed out, there were no running tasks or playing media, I thought it might be some image extraction or something (I have chapter image extraction only for a few libraries that have been processes already) but the next day in the evening I couldn't stream some media well, the media wouldn't play and upon checking it was still stuck on a high CPU usage, I restarted my machine, and It's still maxing out a core, (keeps alternating between core 2 and 3) and at this time I can play media without an issue, however the high CPU usage is weird, especially because nothing seems to be processing, I gave the logs a glance, but I'd like to avoid sharing em considering the sensitive info in them and the time it would take to remove all of it


RE: High CPU Usage - TheDreadPirate - 2024-04-06

How is Jellyfin installed? Docker? If so, which image?


RE: High CPU Usage - AyaanMAG - 2024-04-06

(2024-04-06, 05:49 PM)TheDreadPirate Wrote: How is Jellyfin installed?  Docker?  If so, which image?
Jellyfin has been installed on my Raspberry Pi OS not via Docker


RE: High CPU Usage - TheDreadPirate - 2024-04-06

Can you share the log? What sensitive info is in it? The content type? Or IPs? If these are 192.168.X.X IPs, those are not sensitive.


RE: High CPU Usage - AyaanMAG - 2024-04-07

(2024-04-06, 06:59 PM)TheDreadPirate Wrote: Can you share the log?  What sensitive info is in it?  The content type?  Or IPs?  If these are 192.168.X.X IPs, those are not sensitive.

Hello, I have uploaded the logs here https://pastebin.com/90AL7BEC i have redacted certain paths, media, and device names


RE: High CPU Usage - TheDreadPirate - 2024-04-07

Code:
-codec:v:0 libx264

You're trancoding. And on the CPU. Not that the Rpi5 has a hardware encoder.

Your choices are to turn off transcoding and deal with the breakage that will result when clients can't play videos or pre-transcode on another machine to a more compatible format.

H264 main 8-bit
AAC stereo
burned in subtitles or external SRT subtitles
MP4 container.


RE: High CPU Usage - AyaanMAG - 2024-04-08

(2024-04-07, 04:07 PM)TheDreadPirate Wrote:
Code:
-codec:v:0 libx264

You're trancoding.  And on the CPU.  Not that the Rpi5 has a hardware encoder.

Your choices are to turn off transcoding and deal with the breakage that will result when clients can't play videos or pre-transcode on another machine to a more compatible format.

H264 main 8-bit
AAC stereo
burned in subtitles or external SRT subtitles
MP4 container.

Thank you but i don't understand why anything is transcoding at all, nothing is playing right now, what is transcoding??

I just looked at the part that was transcoding in the log file and that was for a moment before i switched over to the desktop app to play the same media facilitating direct play, in aware of the implication of playing media in the browser and always use the desktop app when possible but this is a near constant usage of my cpu, even when nothing is being used, nothing being played, like right now


RE: High CPU Usage - TheDreadPirate - 2024-04-08

Did you install jellyscrub? Or did you enable chapter image extraction in the library settings?


RE: High CPU Usage - AyaanMAG - 2024-04-08

(2024-04-08, 01:07 PM)TheDreadPirate Wrote: Did you install jellyscrub?  Or did you enable chapter image extraction in the library settings?

There is no running task for chapter image extraction and no jellyscrub, no.

Edit: For the scanning being stuck i think it might have to do something with this bit in the log files https://pastebin.com/eSfT2cVV


RE: High CPU Usage - TheDreadPirate - 2024-04-08

What is the process name that is currently consuming CPU? Is it Jellyfin or ffmpeg/ffprobe?