Jump to content

Hardware acceleration not utilizing more than one GPU


maxxoverclocker
 Share

Recommended Posts

maxxoverclocker

I have found that when more than one GPU is installed, Emby does not utilize it even though it is shown in Transcoding > Enable hardware acceleration when available > Advanced:

image.png.60497eaa95d53927781e2d831b5dac3e.png

Both GPUs will work individually however, Emby will not use both at the same time. Only the first GPU gets used. The GPUs in question are Nvidia 1050Tis, which support up to 3 encoding streams. After 3 streams have been started, software transcoding occurs. I believe what is happening is that no GPU is specified other than the first one when calling ffmpeg, but that's just my guess.

-hwaccel_device:v:0 0

nvidia-smi status reflects this:

==== nvidia-smi status ================================================================================

Sun Jul 17 14:15:13 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.57       Driver Version: 515.57       CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:04:00.0 Off |                  N/A |
| 50%   43C    P0    N/A /  75W |    698MiB /  4096MiB |      8%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  NVIDIA GeForce ...  On   | 00000000:1B:00.0 Off |                  N/A |
| 29%   41C    P8    N/A /  75W |      4MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1888      C   /opt/emby-server/bin/ffmpeg       220MiB |
|    0   N/A  N/A      1915      C   /opt/emby-server/bin/ffmpeg       232MiB |
|    0   N/A  N/A      1989      C   /opt/emby-server/bin/ffmpeg       240MiB |
+-----------------------------------------------------------------------------+

I have tried multiple driver versions:

  • NVIDIA-Linux-x86_64-470.86
  • NVIDIA-Linux-x86_64-515.57

with the same results on each. This is using Emby server v4.7.5.0, and I'm running in a virtualized setup on ESXi with Ubuntu 20.04 as my guest OS for Emby with hardware passthrough for the GPUs. I've attached the emby server logs, but please let me know if you need me to provide anything further.

emby-logs.7z

Link to comment
Share on other sites

GrimReaper

Hey up,

you can remove 3-stream limit on Nvidia cards as per:

45 minutes ago, maxxoverclocker said:

The GPUs in question are Nvidia 1050Tis, which support up to 3 encoding streams. After 3 streams have been started, software transcoding occurs.

with unlock patch, your 1050Ti can support quite a few streams more. 

Link to comment
Share on other sites

maxxoverclocker
2 hours ago, GrimReaper said:

Hey up,

you can remove 3-stream limit on Nvidia cards as per:

with unlock patch, your 1050Ti can support quite a few streams more. 

Awesome! I'll check this out.

Link to comment
Share on other sites

maxxoverclocker
On 7/17/2022 at 3:32 PM, GrimReaper said:

Hey up,

you can remove 3-stream limit on Nvidia cards as per:

with unlock patch, your 1050Ti can support quite a few streams more. 

Thanks @GrimReaper this was a huge help. I'm able to get ~10-12 streams now out of these cards. It would be nice to be able to use the 2nd GPU though... In the meantime I configured it so that one card is dedicated to decoding, and the other for encoding.

  • Like 1
Link to comment
Share on other sites

rbjtech
12 hours ago, maxxoverclocker said:

Thanks @GrimReaper this was a huge help. I'm able to get ~10-12 streams now out of these cards. It would be nice to be able to use the 2nd GPU though... In the meantime I configured it so that one card is dedicated to decoding, and the other for encoding.

I'd be interested in seeing the stats on splitting the workload of the cards like that.

I was under the impression that if you are transcoding in h/w, then it's probably better to keep the resulting decode 'in memory' on the same card so it can then be piped into the encoder (on the same card).   By splitting it - the actual decoded (raw) frame has to leave the card, go over the pcie bus and then get put back into memory on the other card before it can then be 'encoded'.

@softworkz  Any thoughts here ? 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...