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) |
RE: High CPU usage - TheDreadPirate - 2024-01-23 (2024-01-23, 01:35 PM)spanky34 Wrote: 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. Sure. RE: High CPU usage - JoeyG1973 - 2024-01-23 Going to throw my interesting discovery in here. This is happening when I play a 4k steam with subtitles. It's a .mkv and I thought that having the subtitles extracted would reduce the load, but to no avail. Guess that subtitles are added to the video stream on the fly, which now that I think about it, is exactly what is happening. Still it makes no sense why I have such a high cpu load. I have a Nvidia P400 and before I got CUDA setup working with Jellyfin if I played the same stream with subtitles, it simply would lock up and not play, which makes sense considering I am rocking a "Intel® Core i7-4790 CPU @ 3.60GHz". I know it is working because nvidia-smi says as much. I would have thought that having all this transcoding off loaded to the GPU would not have impacted the CPU as much as it does. All this said, videos play smooth with subtitles in 4k on my local network. Not something I can say worked with Plex. Same setup with Plex and it was constantly buffering on the client end. Running straight on Fedora 39. root@gpm:~# rpm -qa | grep jellyfin jellyfin-firewalld-10.8.13-1.fc39.noarch jellyfin-server-10.8.13-1.fc39.x86_64 jellyfin-web-10.8.13-1.fc39.noarch jellyfin-10.8.13-1.fc39.x86_64 I also hacked /etc/jellyfin/encoding.xml to use the jellyfin-ffmpeg portable I got from here https://github.com/jellyfin/jellyfin-ffmpeg/releases however it doesn't seem that much more efficient than the one that comes with Fedora 39. And yes you need to hack it into that file because it is not something that you can change from the UI. Added the following 2 lines. <EncoderAppPath>/usr/local/jellyfin-ffmpeg/ffmpeg</EncoderAppPath> <EncoderAppPathDisplay>/usr/local/jellyfin-ffmpeg/ffmpeg</EncoderAppPathDisplay> I want to know why the CPU is still screaming even with the work being offloaded to the GPU. To add to this after about 15-30 minutes of playing the stream, the ffmpeg just goes away until I stop the client playback and start again. The box is still snappy though even with all of this CPU load. Any thoughts on this? Code: root@gpm:~# nvidia-smi Running top and I can clearly see that ffmpeg is trying to break the box. htop doesn't look much better This is the full command that is running: Code: root@gpm:~# ps -eaf | grep 380547 RE: High CPU usage - TheDreadPirate - 2024-01-23 If you are also transcoding audio, that will occur on the CPU. If your GPU is blowing through the video, your CPU will have to keep up. RE: High CPU usage - JoeyG1973 - 2024-01-23 How do I know if I am transcoding audio? How come ffmpeg only fires up when I turn on subtitles? I play the same stream, Dolby Digial EX Audio 5.1 @ 448 kbs, both with and without subtitles like as mentioned, it only fires up ffmpeg with subtitles enabled. My curiosity is killing me here and I am trying to understand. RE: High CPU usage - TheDreadPirate - 2024-01-24 Depending on the client, when video is transcoded the audio is also transcoded. If you share the ffmpeg log with us we could figure that out. RE: High CPU usage - joeblackdandt - 2024-03-08 Sorry for jumping in out of nowhere, but I am facing a similar issue, once I start watching something, anything, it just makes the CPU stay above 94% for hours until I end up restarting jellyfin. I am running Jellyfin on Terramaster NAS F2-221. No issues with watching videos, it just triggers the CPU like this. I ran ps aux, result attached. Thanks in advance RE: High CPU usage - TheDreadPirate - 2024-03-09 Looks like it is transcoding. Does the CPU usage return to normal after you stop watching the video that triggered the transcode? RE: High CPU usage - tsgillx - 2024-03-09 No it does not turn to normal. Since I was transitioning from Plex to Jellyfin I left plex running too. Seems like if Plex is running on the TrueNAS server at the same time it causes the high cpu usage. Not sure why. I just turned PLEX off now it is running very smootly. Now i need to find a way to syn somehow free plex watch history with Jellyfin. I dont have plex pass RE: High CPU usage - TheDreadPirate - 2024-03-09 How are you installing Jellyfin on your NAS? From Asustor's app store? Or a docker image? If docker, which one? Can Asustor NASes run docker? RE: High CPU usage - spanky34 - 2024-05-12 Resurfacing to mention I found the source of my issues. It was related to remote users having content paused and then the screensaver taking over. I FINALLY got everyone to confirm the screensavers are disabled on their AndroidTV clients (firetv and CCWGTV) and the high CPU usage went away. It's been about 10 days of quiet over here. |