When you say that the iGPU can’t be claimed, are you saying that this is specific to AMD?
I’ve rebuilt my server, with an i3-8100, ZFS Pool, and 16gb RAM… it should be fine… Are you saying there are performance issues with HW Transcoding on 18.04 due to an inability to lock down the iGPU?..
Is that why when I turn on HW Transcoding, it buffers like craaaaazy?
I was going to take my i7-8700k out of my gaming rig and put it into my server to test this out, because looking at my graphana+prometheus stats, I’m not maxing anything out, CPU is at around 25%, RAM at 30%, the 3xHDD’s in a ZFS pool are only going at about 10% of their bandwidth… I can’t think of why the HW Transcoder is having such a problem!
If you can reach out @ChuckPa to said Ninja… ask him/her what I could do to benchmark or isolate the issue … that would be great!
What we had found was, for an Intel CPU, the kernel did not proper identify, initialize, and make a device entry for it. This is my definition of ‘claim’. When the kernel has it in the devices list, it ends up in /dev. For PMS usage, it ends up as /dev/dri.
Pursuant to Plex hardware transcoding, If there is no recognized hardware acceleration, everything will be done by the CPU. If you’re telling me the CPU is buffering like crazy, this is the proof the hardware is not engaging OR you have image-based subtitles and are simply running out of CPU for subtitles (which are always CPU based)
I would like to see the XML of the file you’re using to obtain these results with.
I’m saying with HW Transcode on, the cpu whilst playing the same file is at around 30%… nothing is peaking in terms of any stat i can see… If i disable the subtitles, yes, it goes into direct stream, then there’s no problem there obviously.
This is purely anecdotal, but I figured it was worth tossing out there. I’m testing a PMS instance (not via docker) on an Apollo Lake NUC with Ubuntu 18.04. Hardware acceleration is working consistently for all the expected media types (AVC, HEVC, MPEG2). I’m also not using an HDMI dummy plug. I’ve tested with and without, and it has worked consistently either way.
No local data storage beyond the SSD boot drive. It’s pulling media files from a NAS.
The only weirdness: Deinterlacing seems to be problematic with MPEG2 recordings, both 480i and 1080i. I’m still seeing combing with heavy movement. I haven’t done a full comparison with a Windows install yet, though, to see if it’s specific to Linux.
That “anecdotal” of MPEG2 and deinterlacing is in the codec and they’re working on it. I don’t know how that work is progressing (no visibility) but windows has this sort of thing embedded in the OS kernel versus Linux must use a kernel driver for the ASIC and libva.so to perform the actual rendering interface with the transcoder
Thanks for the XML. It does export nicely… to your browser Nobody has access to your *.plex.direct address except you (how the security works)
Those PGS (image based) subtitles are going to kill the i3 hands-down. (is i7 above a typo?)
All subtitle processing must be done in the CPU (not the ASIC/GPU) because Intel did not design in support for subtitle overlay in the current QSV design.
As verification, create a test copy by ‘remuxing’ (mkvtoolnix-gui or mkvmerge) and remove all the subtitles. Move the original someplace safe. Put the subtitle-free version in its place.
“analyze” the file again to update PMS.
Depends on how many streams of subtitles you expect to handle. You’ll get one, likely two, never have seen more than three with any appreciable bitrate and audio transcoding concurrently.
Well, I thought I needed an HDMI plug to get built-in Intel HW transcoding to work. However I just tested live TV play with HDMI dummy plug both in and out and I see no difference. Plex claims that (hw) encoding is in effect in both cases.
However, I’m seeing much higher CPU utilization now (PMS 1.13.4.5251) with htop bouncing around between 40% and 90% on an mpeg2 to h264 transcode. So, I’m wondering if HW transcode is even happening? How can I tell for sure if Intel GPU HW is being used?
When I first experimented with HW transcoding it was on PMS 1.13.0.5023 and I recall CPU utilization was low, around 10% when HW transcode was engaged.
Ubuntu 18.04
Motherboard: MSI B360
RAM: 16gb DDR4 PC-2400 (4x8gb)
HDDs: SSD for main drive, 3x 4TB on a ZFS Striped Pool
Now…
i3-8100 and the i7-8700k both have the same issue with hardware trans-coding. What happens is that it seems to work fine, then 3-5 seconds it buffers, i get the warning about not being powerful enough… if I disable HW Transcoding then It’s ok, the i3-8100 just isn’t powerful for SW Transcoding a 4k HEVC 10bit file, but I knew that, that’s why I went the 8th gen Intel chips.
I then went to windows, put in both chips, same file… no videocard so 100% CPU… Hardware transcoding was fine…
It’s Ubuntu 18.04.
Here’s my theory (as a software engineer).
I think what @ChuckPa was saying that the iGPU wasn’t getting claimed by plex… I have a feeling that it might be a factor here. the CPU Usage stays about the same, the only thing I’ve noticed is that Disk IOps on the root drive spikes as it happens, same with disk IO Usage … The zfs pool is doing its thing reading data at a normal rate, then all of a sudden a huge spike in disk write on the main drive… it always happens at the time when the video pauses and i get the buffering… I’m guessing that the main FS is getting written too from the transcoder, but why the bursts? the Memory usage isn’t changing, so i know it’s not running out of memory or swap… it’s just all of a sudden pausing the video, then writing to the main disk for a short burst, then buffering, then playing and repeat…
I think the next test I could do would be to downgrade to 16.04 and try again. @ChuckPa would you be able to ask that engineer if they would agree with my theory? and also Is there any way I can debug this further?
Otherwise I’ll just downgrade to 16.04 and try the i3-8100 again.
It just makes sense right now that since my server is in this config I might be able to assist in debugging the problem.
@ChuckPa i’m going to send you a snapshot of my prometheus data
is there a possibility that the GPU transcoding will be available for non-intel processors at some time in the future?
Not that I am planning on expanding out the usage of the server much beyond what it is doing at the moment… just that it would be good to have an idea of what we could plan to ‘upgrade’ to if we need in the future.
It’s an ASIC (Application Specific Integrated Circuit) which does the video work.
while typically used in conjunction with the GPU, electrically it’s independent.
The linux kernel must communicate with it as a distinct device,
With this as foundation:
When the kernel starts, the very first thing it does is probe / search for all the hardware it can recognize.
When this scan is complete, it then initializes each to make sure they’re ready to ‘start’
It a device (ethernet controller, disk controller, CPU ASIC, whatever) isn’t responding as it should, the kernel deems it NOT-READY and removes it from the list of devices it’s about to publish
When all initialization is done, /dev is created and all the device nodes are created
At this instant /dev/dri is created. The interface handles (renderD128, etc) are created as well
This is the “claim” i speak of. The CPU has seen it, initialized it, and had meaningful responses from it. It deems it a valid device to present to the applications (Plex) for use