Jump to content

Load balance between multiple GPUs


Recommended Posts

Neureka
Posted

I have x3 Intel Arc cards and it would be amazing if Emby could load balance streams between the 3 cards. 🤩

visproduction
Posted (edited)

Why wouldn't just setting up Round Robin style load balancing be enough?  The number of cards / servers vs. number of clients seems to be something that Round Robin could easily handle.  Of course, that may be easier said than done, since the Media streaming is from inside the Emby service.  In any case, here are some options that work for some services.

https://duckduckgo.com/?q=Round+Robin+load+Balancing+setup+Linux&ia=web
https://duckduckgo.com/?q=Round+Robin+load+Balancing+sARC+cards&ia=web

Edited by visproduction
Neureka
Posted
1 hour ago, visproduction said:

Why wouldn't just setting up Round Robin style load balancing be enough?  The number of cards / servers vs. number of clients seems to be something that Round Robin could easily handle.  Of course, that may be easier said than done, since the Media streaming is from inside the Emby service.  In any case, here are some options that work for some services.

https://duckduckgo.com/?q=Round+Robin+load+Balancing+setup+Linux&ia=web
https://duckduckgo.com/?q=Round+Robin+load+Balancing+sARC+cards&ia=web

I’m not looking to load balance between Emby instances or separate servers. I need a way for Emby to load balance between the GPUs internally. The Emby software itself manages ffmpeg and the arguments it uses and I’m not aware of a way to override that behavior.

visproduction
Posted

Yes, that sounds tricker.  Only related forum discussion I found in 10 minutes:
https://forums.developer.nvidia.com/t/remote-desktop-session-host-gpu-load-balancing/163118

Seems that load balancing could be easier on separate workstations, but then Emby would perhaps need to be OK to load balance.   Hmm, if someone has an answer, I hope they post it here.

Neureka
Posted (edited)

A plugin could probably do it if we can detect what GPUs are being used for active streams and also change the settings for hw transcoding.

@LukeDo you know if the Emby API exposes enough for a plugin to see what device is being used for active streams and changing hw transcode settings?

Edited by Neureka
yocker
Posted

I don't think multiple GPU's let alone GPU balancing is possible in Emby without major changes to Emby it self.
Unless you want to run a huge streaming service i don't see much use for it either to be honest.

It could be a fun feature to play around with though.

  • Like 1
Neureka
Posted (edited)
2 hours ago, yocker said:

Unless you want to run a huge streaming service i don't see much use for it either to be honest.

It's useful for remote 4K HDR AV1 streams. Intel Arc cards are monsters but they still have a limit. :)

 

  

2 hours ago, yocker said:

I don't think multiple GPU's let alone GPU balancing is possible in Emby without major changes to Emby it self.

If there is a way to change the hardware transcode settings via a plugin and detect what device is being used for active streams that are transcoding, we could in theory monitor streams and rotate out the selected GPU. Nothing too crazy but there would need to be a way for a plugin to change Emby server settings and know what device is being used for active streams that are transcoding.

Edited by Neureka
yocker
Posted
10 hours ago, Neureka said:

It's useful for remote 4K HDR AV1 streams. Intel Arc cards are monsters but they still have a limit. :)

 

Yeah that could be, i'm just stuck in the h264/h265 thinking.
Everything else is a pain for compatibility IMO.

Neureka
Posted (edited)
3 hours ago, yocker said:

Everything else is a pain for compatibility IMO.

Yeah, that's why I snagged multiple Intel Arc GPUs. For $100 each it's hard to go wrong. The storage savings from AV1 alone is what really draws me to it. It's extremely efficient without massive quality loss. I wanted to obtain 4K Remux of everything and then encode them to AV1.

There are already settings within Emby that let you pick which GPU you want to use for hardware transcodes. We just need to load balance between multiple that get selected. The simplest method would be to alternate between them ensuring that there is only ever 1 transcode on each GPU, and then 2, etc. A better method would be to query GPU utilization.

If there is a way to do this via plugin I will 100% make a plugin for it and submit it to the catalog, but I'm not sure if plugins have the ability to 1) change emby settings outside of the plguin and 2) detect hardware transcodes and the GPU being used. If plugins have access to the entire container then I could use linux tooling for this but then it wouldn't work outside of docker.

Edited by Neureka
  • 7 months later...
Posted (edited)

I am confused about the abilty to select multible GPU's in the transcoding settings if only the first one is ever used per codec. I suppose If you wanted to use all HEVC's with an Nvidia card and AV1's with an Intel Arc it makes sense. But I only use HEVC so is there any advantage in having multible transcoding GPU's? 

Which leads me to this question. Which is better to use with only multiple HEVC transcoding streams, Nvidia RTX A2000 or Intel Ultra Arc Graphics (Xe-LPG) and why?

Edited by dcol
Neminem
Posted
11 minutes ago, dcol said:

Intel Ultra Arc Graphics (Xe-LPG)

But it's really new and I'm not sure if it works with Emby.

It might work with Emby beta.

But ATM intel is the king of transcoding.

Nvidia is king of LLM.

Posted

Beta has the drivers. You mean AMT Intel. I don't use AMT, or I don't think I do.

yocker
Posted
3 hours ago, Neminem said:

But ATM intel is the king of transcoding.

Nvidia is king of LLM.

I don't doubt you but do you have any benchmark numbers for this? I can't find any anywhere and have been holding back looking for a new card because of that.

Posted

Ditto.

I just want to know if the Nvidia or Intel would be better to use for speed and quality with HEVC source.

I assume that if you have both, you can select AV1 to goto the Intel Arc.

TMCsw
Posted (edited)

Don't ever decode on one GPU and then encode on a different GPU; transferring the data (uncompressed) between them negates any performance difference/benifit.

For now, stick with the Intel iGPU/ARC card (It's better and uses less power).

Emby does not currently do load balancing amoung GPU's.

 

Edited by TMCsw
Posted

That is too bad. Maybe some day.

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
×
×
  • Create New...