Jellyfin Forum
High CPU load even with HW Transcode - why? audio? driver? - 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 load even with HW Transcode - why? audio? driver? (/t-high-cpu-load-even-with-hw-transcode-why-audio-driver)



High CPU load even with HW Transcode - why? audio? driver? - Iacov - 2024-02-18

hi

i want to switch from plex to jellyfin and have set up my server but am facing a problem that I need your advice on

my environment:
CPU: Intel N100 (minisforum un100l, 16gb RAM)
Hypervisor: Proxmox (8.1.4 i think with the most current kernel)
VM: Ubuntu Server 22.04 Hwe Stack
Docker: linux Server image with tone mapping mod and device mapping
CPU: 3 Cores
Ram: 8Gb

the n100 is only supported with kernel 6.2. the jellyfin documentation also mentions the CL runtime to be at least 23.x
the Ubuntu OS is Kernel 6.5 I think but I have not installed the Intel CL runtime from github as I fathom the docker image is dominant in that regard

I think I can effectively use hw transcoding... the logs mention QSV. if I transcode without QSV, the cpu load is at roughly 90%.

and here comes the issue: when I transcode with QSV on, the cpu load is still at 30-40%

is that normal? is there a usual cause for this? could there be driver issues? or could it be that audio is also transcoded and that taxes the cpu? (can I limit audio transcoding? because good audio is for me mor important than pixel perfect video)

I'm new to jellyfin... please let me know if I can provide further info in order to get a picture of my issue 

thank you very much in advance for your help and advice


RE: High CPU load even with HW Transcode - why? audio? driver? - nyanmisaka - 2024-02-18

Can you share the ffmpeg log and a screenshot of top including cpu load?


RE: High CPU load even with HW Transcode - why? audio? driver? - Iacov - 2024-02-18

sure

I'm new to Linux trouble shooting... so just in case...

ffmpeg log is the "normal" log found jn jellyfin dashboard right? how should I post it to not being a massive wall of text?

top is just "sudo htop"?

I have not yet installed Intel gpu tools... would intel_gpu_top help too?


RE: High CPU load even with HW Transcode - why? audio? driver? - toytown - 2024-02-18

(2024-02-18, 09:18 AM)Iacov Wrote: could it be that audio is also transcoded and that taxes the cpu?

It's almost certainly the case the audio is getting transcoded and using your CPU to do so.  If its encoding to AAC its probably using libfdk_aac which in the past was only single threaded (still is?) which is why you're seeing 25-30% cpu usage (1 of the n100 cores).

Here is my 5900x cpu usage when transcoding a 4K movie, although my Intel Arc is doing the video work, the cpu still needs to do the audio/muxing portion and maxes a single core for approx 3 mins (for a 1h10m movie) - https://imgur.com/a/cpt46YA


RE: High CPU load even with HW Transcode - why? audio? driver? - Iacov - 2024-02-18

thank you - would be relieving if everything works, as i was told that my approach (direct igpu passthrough) is a bad idea
should i install the intel cl runtime on the ubuntu vm? or should everything (driver-wise) be handled by the docker image?

i couldn't get a good screenshot of htop, but the 3 cores are utilized at eg 20, 70 and 20% for a while until they go down to 0,7% each(i have acitvated transcode throttling)

the log states:
---
Stream mapping:
Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> h264 (h264_qsv))
Stream #0:1 -> #0:1 (ac3 (native) -> aac (libfdk_aac))
---