Question / Help GPU Option Question

Duetschbag

New Member
I use NVENC to stream to an internal RTMP server. I'm both gaming and encoding on my GTX 1070. If were to purchase and install another card, let's say a GTX 1060, can I flip the GPU option to 1 to encode from the 1060 instead? This way I can take some of the load off of the 1070 and get some of my frames back. :)

I've looked through the forums and seen two responses to this. Either yes you can, or no you have to encode on the same card in which the game is being played. Can anyone clear that up?
 

koala

Active Member
You can switch, but you will not gain performance. This is because nvenc is a dedicated circuit on the GPU chip, so it doesn't matter for GPU load if it is encoding or not, so no performance is gained or lost by moving nvenc encoding to the other GPU. You will even lose a small bit of performance, because the pcie-speed for one Graphics card will be reduced to 8x, if two cards are installed. If only one card is installed, it is running with x16 speed.
 

Duetschbag

New Member
I saw what you're saying about the dedicated circuit for GPU encoding on another thread. People keep saying that gaming and encoding on the same card won't have an effect on performance because of that, but I definitely am. When I'm streaming, I have to reduce graphic settings on certain games in order to get 60fps. If I'm not streaming, my card handles it just fine.
 

koala

Active Member
This is because OBS needs a bit of GPU resources for itself for compositing the video, in addition to the resources needed to encode video. If you let your game run unlimited, there are no resources left for OBS to composite the video, so it outputs only part of the frames. This is visible as "Number of lagged frames due to rendering lag/stalls" in the logfile. Compositing is an added intermediate step OBS performs in contrast to pure screen recorders like Shadowplay. It's the processing step where multiple sources are merged into one video frame and filters/effects are applied.
The data path is this: grab frame from frame buffer->compositing with other sources->send to encoder->send to disk/stream.
If OBS isn't able to produce every frame in the compositing step, the frames that reach the encoder are reduced and visible as lags/choppy video. By limiting the game FPS, you give OBS the GPU resources it needs for compositing.
 

Duetschbag

New Member
Maybe I need to grab a log file then and look through that. I enable VSYNC or cap frames on all my games to 60FPS to avoid issues with frame loss and lag. But the GPU still seems to be taxed significantly when streaming and gaming using NVENC.
 

BK-Morpheus

Active Member
OBS first needs to grab your game frames, compose your scene, scale it etc. and then render that scene, before it can be encoded into a video stream.
The additional load, that you see/feel, while gaming and running OBS is coming from the increased PCI-E bandwidth load (frames beeing pulled from GPU into OBS and then pushed back to the NVENC on your graphics card) and the scene rendering.
The encoding via NVENC itself is not really taxing your ingame frames. It's the rendering and bandwidth load.
Both will still be the same, when you install a second GPU for rendering. You might even get way worse performance, as most processor+mainboad combinations will reduce the PCI-E speed (and therefore bandwidth) of the main GPU from x16 to x8, as soon as a second GPU is installed.
 
Top