Specific situation: separate encoding GPU

therootedone

New Member
Hello everyone. I've searched some threads mentioning that adding a second GPU to a system dedicated to encoding won't bring much if any performance gain but I'd like to ask about a specific situation here.

Currently streaming Minecraft with an older system and GPU. The stream can work just fine without running shaders in game, something that puts a heavy load on the GPU.

Problem is when shaders are put on, we run into encoding overload. I've tried the different encoding options between hardware and software but nothing is powerful enough to solve the problem.

I'd like to ask if adding a second GPU for encoding would make a difference. I've also read on here that there's no way to separate the device that's rendering the game and what OBS is using so that may answer it, but I would still like to ask to get confirmation on that. If there is a way to do that though I would be all ears!

Thanks!
 

DayGeckoArt

Member
I tried using two Nvidia graphics cards with encoding on one, and it didn't work well. I think it was very slow, and I don't know why. I want to try this with an Intel Arc graphics card as a dedicated encoder but I don't know if it will work well with OBS. I have a thread on this but no replies...
 

koala

Active Member
If you have a AMD GPU, shaders use the same computing resources as the AMD hardware encoder, so this would be an explanation you get encoder overload if you use shaders.
If you have an Intel CPU and running the game on an external GPU, you can use Quicksync on the iGPU as encoder, which is effectively offloading encoding to a different GPU. Using Quicksync on the iGPU isn't wasting that much resources as using a hardware encoder on an external GPU.

Buying a second GPU with the purpose of offloading encoding to it will probably fail. But if you're buying a second GPU, buy it to completely replace the existing GPU. Nvidia GPUs have nvenc as encoder, which is a dedicated circuit and not using up GPU shader resources, so chances are good you can run your game with shaders and not getting encoder overload.
 

DayGeckoArt

Member
If you have a AMD GPU, shaders use the same computing resources as the AMD hardware encoder, so this would be an explanation you get encoder overload if you use shaders.
If you have an Intel CPU and running the game on an external GPU, you can use Quicksync on the iGPU as encoder, which is effectively offloading encoding to a different GPU. Using Quicksync on the iGPU isn't wasting that much resources as using a hardware encoder on an external GPU.

Buying a second GPU with the purpose of offloading encoding to it will probably fail. But if you're buying a second GPU, buy it to completely replace the existing GPU. Nvidia GPUs have nvenc as encoder, which is a dedicated circuit and not using up GPU shader resources, so chances are good you can run your game with shaders and not getting encoder overload.

I thought this was settled a long time ago. NVenc does use CUDA cores. "Separate part of the GPU" is a myth. I've posted screenshots proving it, and many others have shown this. In PUBG at 4K my framerate goes from 120 to 70 when I start recording with Nvenc. With Quicksync it stays the same!
 

koala

Active Member
@DayGeckoArt It is my understanding that Look-Ahead and Psycho Visual Tuning are using CUDA resources. If you deactivate these, the bare nvenc encoder is used.

There are more possible bottlenecks than just CUDA resources: CPU, memory, bus bandwidth. To actually see the cause of your fps drop, you need to carefully investigate what bottleneck exactly it is and rule out other possible bottlenecks. For example, if I run Furmark on my machine, which produces 100% GPU load but 0% CPU load, the fps just barely drops from 180 fps to 175 if I start recording this with nvenc. This is an indication the CUDA load isn't the cause for fps drop and the CPU load takes part in your fps drop. May be also memory and/or bus bandwidth, because this is also something a game uses very extensively, while Furmark not.
 

DayGeckoArt

Member
@DayGeckoArt It is my understanding that Look-Ahead and Psycho Visual Tuning are using CUDA resources. If you deactivate these, the bare nvenc encoder is used.

There are more possible bottlenecks than just CUDA resources: CPU, memory, bus bandwidth. To actually see the cause of your fps drop, you need to carefully investigate what bottleneck exactly it is and rule out other possible bottlenecks. For example, if I run Furmark on my machine, which produces 100% GPU load but 0% CPU load, the fps just barely drops from 180 fps to 175 if I start recording this with nvenc. This is an indication the CUDA load isn't the cause for fps drop and the CPU load takes part in your fps drop. May be also memory and/or bus bandwidth, because this is also something a game uses very extensively, while Furmark not.
I just did a quick test, I turned off Psycho Visual Tuning and recorded my OBS window, dragging it around the screen. I got 10% CUDA usage on my RTX 2080 Ti and GPU power went from 56 watts to 93 watts. This is recording 4K 4:4:4 with these settings

1685032974774.png
 

rockbottom

Active Member
Keep testing, 4:4:4 most likely is the reason for CUDA being utilized.

My 4k encoding settings are similar to above except I'm not encoding 4:4:4 & I never see CUDA being utilized on my 3090.
 

therootedone

New Member
Hey everyone thanks for the replies. I guess more context: the current GPU is a GTX 1650, with an older GTX 780 sitting in a box from a prior build that could have been used as the second one.

The CPU is an Intel chip, is setting up quicksync the other encoding option (that starts with Q)? We did try that and had similar results. If there's an external way of setting that up please do tell!

Streams to Discord sharing the screen don't cause this issue, although I assume those are much lighter on the requirements.
 

DayGeckoArt

Member
Keep testing, 4:4:4 most likely is the reason for CUDA being utilized.

My 4k encoding settings are similar to above except I'm not encoding 4:4:4 & I never see CUDA being utilized on my 3090.
I tested NV12 and 4:2:0 and got 0 CUDA usage with NV12 and 6-7% with 4:2:0
 
Top