Question / Help Two GPUs and 1 PC?

jlw_4049

New Member
I've googled and seen some YouTube videos.

I currently have an i7 6700k, GTX 1080ti, 16gb ram, and spare gtx 1050 laying around.

I play at 1440p at 144hz.

AAA games sometimes utilize everything my GPU has, if I am streaming with the nvenc sometimes it could drop frames and I can feel input lag when I'm gaming due to the encoder using some GPU cycles.

I see in the settings where you can select which GPU to use. Would it be beneficial for me to install the 1050 and use it just for streaming/recording with obs on my second monitor or will it not take the load off of the primary gpu?

Thanks in advanced.
 

DJSean00

New Member
I use a GTX980 and in the streaming options of OBS selects GPU 1 (980) as GPU 0 is my 1080 (which i use for games)

Make sure you use nvenc and you should be good to go!
 

Harold

Active Member
Just having the second GPU installed in your system is likely to completely nullify any performance gains you may get by offloading the encoding on to the second GPU.

It will NOT be beneficial to install a second gpu for any functions of obs.

NVENC encoding happens in dedicated components of the video card, so game impact is minimal at most by having it on your main card.
 

jlw_4049

New Member
Just having the second GPU installed in your system is likely to completely nullify any performance gains you may get by offloading the encoding on to the second GPU.

It will NOT be beneficial to install a second gpu for any functions of obs.

NVENC encoding happens in dedicated components of the video card, so game impact is minimal at most by having it on your main card.
Why doesnt it add the benefit if OBS supports it?

Is it pcie lanes that are the issues that causes the down side.
 

Harold

Active Member
Indeed it is pci-e lanes.
Any performance gains you might get from having the second video card are countered by the fact that the primary video card gets bumped down from x16 to x8.
 

jlw_4049

New Member
Indeed it is pci-e lanes.
Any performance gains you might get from having the second video card are countered by the fact that the primary video card gets bumped down from x16 to x8.

I tried the dual stream PC setup with the latest elgato, it's really not for me. Works great, but on my home server the elgato puts to much strain on the GPU just showing the video in OBS/or any other capture software, that it negatively effects my wife if she's gaming on there.
 

DJSean00

New Member
Indeed it is pci-e lanes.
Any performance gains you might get from having the second video card are countered by the fact that the primary video card gets bumped down from x16 to x8.

Can you explain this one to me? Are you saying your primary GPU has reduced performance due it its slot dropping to 8x due to the second card?
 

jlw_4049

New Member
Can you explain this one to me? Are you saying your primary GPU has reduced performance due it its slot dropping to 8x due to the second card?
That's what he is saying. Which he is right on really high end cards. I might upgrade my socket
 

DJSean00

New Member
So having said that is best to just have one GPU, OBS running NDI sending data across your network to a dedicated streaming PC or a capture card?
 

jlw_4049

New Member
So having said that is best to just have one GPU, OBS running NDI sending data across your network to a dedicated streaming PC or a capture card?

A 2nd pc is best. But only if you have cash to blow.

A dual GPU setup seems like it would be best/easiest if you have more then 16 lanes of pcie

EDIT: https://www.youtube.com/watch?v=XJuj16gRoBI

I think running a 2nd GPU would be more beneficial. Considering streaming/recording hits the gpu around 5 or 10 percent dropping down to 8x seems to only effect you at max 1 percent.

In some cases pci e 3.0 8x is even faster
https://www.techpowerup.com/reviews/NVIDIA/GeForce_GTX_1080_PCI_Express_Scaling/
 
Last edited:

koala

Active Member
Can you explain this one to me? Are you saying your primary GPU has reduced performance due it its slot dropping to 8x due to the second card?
Yes, if you have one GPU, it is driven by x16 pci-express bus speed. But if you insert a second one, both cards are driven with x8 speed. Consumer CPUs aren't designed to output 2 cards simultanously with x16 speed. They split the data transfer to 2x8, one x8 for each separate card. If you have 3 GPU cards, you get 1x8 and 2x4. (The Intel iGPU doesn't count for this, by the way)

On consumer hardware, the main purpose of a GPU is to create, compose and output frames for some graphics application. The graphics assets required for this are loaded by the CPU from HD into CPU memory through the sata interface, then uploaded through the pci-express to GPU memory, then processed by the GPU to fill the frame buffer with the final image, then output to a monitor through hdmi or whatever connector.
The pci-express bus is used for uploading graphics assets into GPU memory, and this stresses the pci-e bus only moderately, because once uploaded, the graphics assets are cached in GPU memory and not much transferred again for the lifetime of one game map/loading screen.
In this scenario, pci-e speed of x16 or x8 isn't important, because the slower transfer time for the graphics assets is either hidden behind game loading screens or not seen at all. Because of this, SLI can work (SLI divides the maximum bandwidth of 1x16 of consumer CPUs into 2x8 for 2 GPU cards).

Now there is OBS, which does frame processing after the frame is rendered by the GPU. It's best feature is to take several video sources, filter, rescale, crop and finallly composite them, and output the composited video to a stream.

This compositing is taking place on the GPU. OBS creates a hidden frame buffer and merges all sources into this hidden frame buffer. This is done on the GPU, because the GPU is extremely efficient in doing this - in contrast to the CPU. Because of this efficiency, even medium-end laptops can be used for streaming.
The best use of resources is if the frame compositing is taking place on the same GPU where the largest frame source is. Usually, this is the game you're game-capturing. OBS just takes the frame buffer of the game and can use it directly as source for the video. No copying of data required.

If you want to offload video compositing to a second GPU, OBS has to copy the captured frame data from one GPU memory to the other GPU memory. This is a download and upload for every frame, continuously. This is huge stress for the pci-express bus, and suddenly the reduced bandwidth (1x8) becomes relevant and may constitute a bottleneck.

Every hardware scenario where the original frames of the game you capture must be transferred through the pci-express bus to a GPU for OBS to composite the stream puts more load to the pci-express bus than envisioned by the hardware designers. This includes capture cards, because although capturing is free (you read it invisibly from hdmi), the data must still be uploaded to the GPU to enable OBS to process it further. Its pci-express bandwidth requirement is half of the dual GPU scenario where compositing is taking place on a different GPU than frame production. But the ideal scenario is game capture in a single GPU system: the game data doesn't have to be transferred at all, because it is created where it can be directly be used.

I didn't speak of GPU load, I spoke about pci-express bus load - which is unfortunately not displayed by any task manager. But it's still there, and if you do things not envisioned by the hardware designers of consumer PCs (downloading stuff from GPU frame buffers), you might get to the limits of a resource deemed unlimited for regular use.
 

jlw_4049

New Member
Yes, if you have one GPU, it is driven by x16 pci-express bus speed. But if you insert a second one, both cards are driven with x8 speed. Consumer CPUs aren't designed to output 2 cards simultanously with x16 speed. They split the data transfer to 2x8, one x8 for each separate card. If you have 3 GPU cards, you get 1x8 and 2x4. (The Intel iGPU doesn't count for this, by the way)

On consumer hardware, the main purpose of a GPU is to create, compose and output frames for some graphics application. The graphics assets required for this are loaded by the CPU from HD into CPU memory through the sata interface, then uploaded through the pci-express to GPU memory, then processed by the GPU to fill the frame buffer with the final image, then output to a monitor through hdmi or whatever connector.
The pci-express bus is used for uploading graphics assets into GPU memory, and this stresses the pci-e bus only moderately, because once uploaded, the graphics assets are cached in GPU memory and not much transferred again for the lifetime of one game map/loading screen.
In this scenario, pci-e speed of x16 or x8 isn't important, because the slower transfer time for the graphics assets is either hidden behind game loading screens or not seen at all. Because of this, SLI can work (SLI divides the maximum bandwidth of 1x16 of consumer CPUs into 2x8 for 2 GPU cards).

Now there is OBS, which does frame processing after the frame is rendered by the GPU. It's best feature is to take several video sources, filter, rescale, crop and finallly composite them, and output the composited video to a stream.

This compositing is taking place on the GPU. OBS creates a hidden frame buffer and merges all sources into this hidden frame buffer. This is done on the GPU, because the GPU is extremely efficient in doing this - in contrast to the CPU. Because of this efficiency, even medium-end laptops can be used for streaming.
The best use of resources is if the frame compositing is taking place on the same GPU where the largest frame source is. Usually, this is the game you're game-capturing. OBS just takes the frame buffer of the game and can use it directly as source for the video. No copying of data required.

If you want to offload video compositing to a second GPU, OBS has to copy the captured frame data from one GPU memory to the other GPU memory. This is a download and upload for every frame, continuously. This is huge stress for the pci-express bus, and suddenly the reduced bandwidth (1x8) becomes relevant and may constitute a bottleneck.

Every hardware scenario where the original frames of the game you capture must be transferred through the pci-express bus to a GPU for OBS to composite the stream puts more load to the pci-express bus than envisioned by the hardware designers. This includes capture cards, because although capturing is free (you read it invisibly from hdmi), the data must still be uploaded to the GPU to enable OBS to process it further. Its pci-express bandwidth requirement is half of the dual GPU scenario where compositing is taking place on a different GPU than frame production. But the ideal scenario is game capture in a single GPU system: the game data doesn't have to be transferred at all, because it is created where it can be directly be used.

I didn't speak of GPU load, I spoke about pci-express bus load - which is unfortunately not displayed by any task manager. But it's still there, and if you do things not envisioned by the hardware designers of consumer PCs (downloading stuff from GPU frame buffers), you might get to the limits of a resource deemed unlimited for regular use.

This is the most in depth explanation I have seen.

So would there be 0 benefit to doing a dual GPU setup with consumer grade parts (16 lanes) even with the hit when the GPU is maxed out to 99 gaming and trying to stream?
 

koala

Active Member
From what we can tell from numerous reports in this forum, yes, there seems no benefit. But the bottleneck in this special case (one GPU is maxed out) is not the pci-e bus alone. It also seems, at least this is how I interpret the corresponding log files, there is a resource starvation on that GPU to even move the data through the pci-e bus. It's not computing resources - reading memory does not require any computing, but it is resource usage. You access the GPU memory and you lock the frame buffers more than you would without downloading that data through the bus. This seem to congest the GPU and lead to stutters and lagged/lost frames.

Because of this you might still see the rendering lag warning in the logs even with 2 GPUs. I'm not a low-level GPU expert, but this is how I interpret the reports in this forum. I don't remember posts that say "I added a second GPU card for compositing and now my encoding lags are gone", so I assume it is not possible to get rid of the problem this simple way. If you could do it this way, we all would be happy and recommend this workaround, but there is simply nobody who tried this, others reproducing it, and reported success.

The only workaround so far seems to throttle the game to not fully use the GPU, or to use a capture card to a second PC to completely offload grabbing and processing the frame data.

The solution to this issue would be a preemptive scheduler on the GPU to let multiple apps get their fair share of GPU resources even if the apps don't cooperate. This is in the hand of the OS and may be GPU developers - Microsoft and Nvidia/Amd/Intel. This is a difficult task, by the way, because it has a realtime aspect and is massively multiprocessing. For the CPU, preemptive schedulers exist since decades, but they are not realtime and not massively multiprocessing, so something new has to be created.
 
haha...you fellas are way too technical. Just tell me if it a second GPU does the job or not. Forget all the mumbo jumbo. So 4049, are you going to buy a second GPU and test it out? No technicals please. Just a yes or no would be good. :)
 

Harold

Active Member
Just having the second GPU installed in your system is likely to completely nullify any performance gains you may get by offloading the encoding on to the second GPU.

It will NOT be beneficial to install a second gpu for any functions of obs.

NVENC encoding happens in dedicated components of the video card, so game impact is minimal at most by having it on your main card.
It all comes back to this. You gain NOTHING by using the second card.
 

jlw_4049

New Member
haha...you fellas are way too technical. Just tell me if it a second GPU does the job or not. Forget all the mumbo jumbo. So 4049, are you going to buy a second GPU and test it out? No technicals please. Just a yes or no would be good. :)

I actually did do some tests. Harold is pretty much right. Running two GPU's is hit and miss and honestly not worth it.

I took my GTX 980 out of my wifes gaming build and ran a bunch of benchmarks. On some games when streaming/recording it helped tremendously. However, on some it actually was worse then running NVENC by itself. It however was never as strong as not recording/stream at all.

I have an elgato 4k60 that I tested with (I'm gonna send it back) It works flawlessly. You loose absolutely no performance from your gaming PC while you are playing using the elgato in a secondary PC. The reason I'm not sticking with this, is I'm not a big time streamer, IDK if I'll EVER be, and it negatively impacts my 2nd PC (my home server/wifes gaming rig specifically her GPU) to the point it can barely run a game at 40 or 50 fps and if she does game at the same time the stream suffers tremendously from it. I have a 3rd PC, but it's my gaming bedroom RIG and it's miniITX so that's a no go, and I'm not building a 4th computer for the house my wife would kill me. Something I didn't know about an elgato is that it uses the secondary pc's GPU to render the scene in real time, even if you aren't using the NVENC encoder. My server PC is a 8 core 16 thread, but it doesn't matter if you are streaming with x264/quickSynce/NVENC the Elgato HAS to use the GPU to render the scene in real time regardless of what encoding method you use for recording/streaming.

Granted you could throw a lower end GTX 950/1050 in a refurbished i7 build for around 200 bucks and have a perfect build for 720p@60fps/1080p@60fps. However, without building a viewer base I'm not going to be out 400 for an elgato, 250 for used parts, 100 for a used low end GPU with NVENC encoder, all for streaming as a hobby. If I am to build up viewers and actually enjoy doing this, I would ultimately upgrade my servers core from Ryzen 1700 to a Ryzen 2700x, and build a cheap build around the 1700 for streaming.

FOR PERFORMANCE:
A second streaming pc is 100% the best solution. I have tried all methods.

The second best solution is actually QuickSync. I ran tons of benchmarks and it causes the least amount of performance hit from your gameplay

The third option is NVENC, it is probably 5 to 10% worse then QuickSync performance hit wise. (Not saying quality, this is all about performance)

The fourth is obviously software x264. If you play at high frame rates this isn't even an option with any lower tier CPU's. This is arguably the best encoding option for streaming. If you have a nice i7/i9 or ryzen multi core cpu, you can easily game and stream. You of course have to balance the settings out it's not as straight forward as NVENC or QuickSync. However it is for sure the best.

It all comes back to this. You gain NOTHING by using the second card.
Ultimately you are right. In some games you do gain from running it this way, but in most application/games you can actually achieve better/similar in game FPS with QuickSync with significantly less power i'm sure.

Ultimately in my opinion, IF you wanna play at HIGH FPS and stream from 1 PC, the best option is QuickSync. Going to post some links to some of the synthetics I did that were most effected by the Single/Dual/QuickSync.

SIDE NOTE: My motherboard has 3 PCI-E slots, so when running both GPU's I was able to keep my gaming GPU in 3.0-16x. My z170x chipset shared lanes with the m.2/pcie slot #3 where I put the GTX 980 and it ran in 4x mode.
In most cases/most people's MB will split the lanes 8x8 regardless. If this was the case, just like Harold says, you would see worse performance overall.

Each image is labeled in the top right.
https://i.imgur.com/lDIdLRI.jpg
https://i.imgur.com/rUkZpDG.jpg
https://i.imgur.com/vcKvwHW.jpg
https://i.imgur.com/yxgkVtD.jpg

I did no control on this test but you still get the idea:
https://i.imgur.com/H3jO887.png
https://i.imgur.com/Nk1XKu9.png
https://i.imgur.com/w2utqZe.png
 
Last edited:
Top