Wowza Community

GPU ID, load balancing

I have some questions relating to GPU ID selection:1/ My understanding is that GPU ID specifies the GPU card. I believe “Use first available GPU” (-1 in the transcoder template XML) is essentially equivalent to saying “always use card 0”. Is this correct?

2/ What about NVIDIA cards with multiple NVENC cores? Does that change the indexing? Or are both cores auto load balanced?

3/ I understand that there is no platform support for load balancing. It appears that the transcoder template .XML is re-read every time the specific incoming stream starts (no application restart required). WDYT if we were to build a poor-man’s load balancer that changes in the template .XML file based on system conditions? The goal would be to steer the next new stream to the selected GPU.

Hi @Ben Jun. You’re not the first one to ask this - about a year ago I had a similar case for a customer :wink: and with some Googling I found back the following article: Will that help?

Light at the end of the tunnel! Unfortunately my java coding resources are limited.

Does this require the IDE + manual code change or can we just copy over a file and refer to it in Server.xml ?

I did read the article, but I thought I had to manually add the code file. Thank you!

Quick clarification: if a GPU card has multiple NVENC cores, is anything special required to use the full set of NVENC cores?


Have you read the article? “The TranscoderVideoLoadBalancerCUDASimple class is built into Wowza Streaming Engine ( and later). It can be used without any additional coding to do fairly simplistic load balancing” …