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)

Pages: 1 2 3 4


RE: High CPU usage - spanky34 - 2024-01-19

Subtitle Extraction:  Disabled
Thumbnail Extraction:  Disabled
Jelly Scrub: Not installed
Intro Skip:  Not Installed

Let it run and it's still happening on my end..

According to the Scheduled Tasks the server has nothing running.

Here's what htop looks like:
[Image: lVAHhkx.png]


RE: High CPU usage - tmsrxzar - 2024-01-19

now that you have identified an ffmpeg process running 450% CPU usage; how about a 'ps aux' output to get it's command line so you know what it's attempting to do


RE: High CPU usage - spanky34 - 2024-01-19

I was unaware that the command field in htop would differ from ps aux.  Will grab that the next time I see it.  My server fans are not quiet when it's working that hard so I already killed the processes. 

Another change to document was the I killed my erstatzTV tuner in JF after I killed the processes this morning.


RE: High CPU usage - tmsrxzar - 2024-01-19

using ps aux will give you the entire command line so if ffmpeg was trying to process a stream you would see it, if it was stuck processing a file for thumbs you would see that too
knowing that the process is ffmpeg and it originates in /usr/bin/jellyfin is not so informative to know what it is actually doing

seems possible that it's still processing a stream in the background since erstatzTV is involved with the setup

quick note, ps aux may exceed the terminal buffer so you may need to output to a text file, ps aux > temp.txt


RE: High CPU usage - spanky34 - 2024-01-20

Fans were screaming again this morning.  

Ran ps aux and the command section didn't contain any additional info. 

To make sure I wasn't missing anything, I ran with sudo and same result.

Finally ran sudo ps aux ffw | grep jellyfin and this is the screenshot I'm posting.  Still same result

[Image: 58Ld15b.png]


RE: High CPU usage - TheDreadPirate - 2024-01-20

You need to redirect the output to a text file since the command is longers than the terminal width.

Code:
ps aux | egrep "jellyfin|ffmpeg" > temp.txt



RE: High CPU usage - spanky34 - 2024-01-20

Yeah, I tried that as well.  It is not wider than the terminal width and the command in the file is the same.

Here's a screenshot of ps aux that I redirected to a txt file earlier today before killing the rogue process.
[Image: SNlVGg2.png]

It's clear the process above it was larger than the terminal width and I'd have to scroll over to see the full command. This one stands alone and is short enough to fit on the screen.


RE: High CPU usage - spanky34 - 2024-01-23

Tonight I heard it screaming without any active sessions going. 

Dropped into the docker container and did ps aux > auxtemp.txt:

Code:
USER        PID %CPU %MEM    VSZ  RSS TTY      STAT START  TIME COMMAND
root          1  0.0  0.0    208    0 ?        Ss  04:00  0:00 /package/admin/s6/command/s6-svscan -d4 -- /run/service
root          15  0.0  0.0    212    0 ?        S    04:00  0:00 s6-supervise s6-linux-init-shutdownd
root          16  0.0  0.0    200    0 ?        Ss  04:00  0:00 /package/admin/s6-linux-init/command/s6-linux-init-shutdownd -c /run/s6/basedir -g 3000 -C -B
root          72  0.0  0.0    212    0 ?        S    04:00  0:00 s6-supervise svc-jellyfin
root          73  0.0  0.0    212    0 ?        S    04:00  0:00 s6-supervise svc-cron
root          74  0.0  0.0    212    0 ?        S    04:00  0:00 s6-supervise s6rc-fdholder
root          75  0.0  0.0    212    0 ?        S    04:00  0:00 s6-supervise s6rc-oneshot-runner
root          83  0.0  0.0    188    0 ?        Ss  04:00  0:00 /package/admin/s6/command/s6-ipcserverd -1 -- /package/admin/s6/command/s6-ipcserver-access -v0 -E -l0 -i data/rules -- /package/admin/s6/command/s6-sudod -t 30000 -- /package/admin/s6-rc/command/s6-rc-oneshot-run -l ../.. --
abc          511  205 27.4 9198864 4494200 ?    Ssl  04:00 2277:05 /usr/bin/jellyfin --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg
root        512  0.0  0.0  7368  3712 ?        Ss  04:00  0:00 bash ./run svc-cron
root        522  0.0  0.0  5768  1920 ?        S    04:00  0:00 sleep infinity
root        7252  0.0  0.0  7632  4096 pts/0    Ss  22:29  0:00 /bin/bash
root        7327  0.0  0.0  10068  3456 pts/0    R+  22:31  0:00 ps aux



RE: High CPU usage - TheDreadPirate - 2024-01-23

Still not enough info, BUT the fact that it ran at exactly at the top of the hour tells me it is one of the scheduled tasks.

Definitely need logs to figure out which scheduled task is running at 0400 on the dot. You can access them in the dashboard. Click on "jellyfin20240122.log" and copy and paste the log contents to pastebin or sourcebin.

   


RE: High CPU usage - spanky34 - 2024-01-23

I believe the reason why it's at 4AM is because that's when I've got the docker container set to reboot via crontab script. According to the GUI scheduled tasks, there was nothing actively running at the time of the ps aux.

Can I DM you the logs? I have multiple users and don't want to publicly post the logs due to potentially identifiable information. Also... log apparently is too large for both locations. Might have to truncate the logs into multiple posts. The logs for the day are about 8MB.

Edit: Going to tweak the log level to informational level and let it run for a bit. Will see if I can spot anything over the next day or so. It does appear I may have some issues with items in my library due to many ffprobe failures and this thread appears to lineup with what I'm seeing. https://github.com/jellyfin/jellyfin/issues/7888