Question / Help Best GPU for Rendering Previews - Advice Needed

Michael Berry

New Member
I'm using OBS right now due to COVID-19, not to stream, but to be just a video/audio mixer for several C920 webcams to feed into zoom/skype. In my setup prep last week I was testing and was finding that sometimes my rendering times would spike a little (like up to 8 or 9 ms from around 2-3ms). I'm trying to keep latency to a minimum so I did some reading and found that it is caused by GPU overload.

I'm running an older Dell desktop (Optiplex 990, Win10 Pro, 8GB i5, OBS 25.0.1, using what I have available right now cuz its hard to buy things) and was using the integrated video on the PC. So I went to Best Buy and bought a Radeon RX5500XT card and put it in there. Surprisingly the rendering lag and dropped frames due to rendering lag got a lot WORSE (14ms+). I used the GPUZ tool and it looked as if the video card was barely coming off of idle.

I did a similar test on my dell laptop that has an Nvidia GeForce 940MX card in it. Same results, the integrated graphics performed way better than switching OBS over to use the dedicated graphics card. Same thing, the GPU was not working very hard at all, not ever exceeding around 40%. It seems like there is a "traffic jam" of sorts with the rendering frames. When there is a lot of movement on screen to process it backs up and the rendering time spikes way up and it seems to stay there for several seconds until the movement on the OBS preview stops and it "clears" out the queue of backlogged frames.

So, I returned the card to BestBuy and we're getting along with the integrated graphics on the Optiplex Desktop PC. So, I'm wondering, if I were to buy a new PC or a video card for my use case with OBS, what should I buy? Is there some other bottleneck between the CPU and GPU that could be causing these frames to get backed up? I've read the posts on the rendering lag but I've never seen my GPU get close to maxed out so I'm trying to figure out what could be another cause of rendering lag.

Any help would be appreciated :)
 

unknowndomain

New Member
A few thoughts.

1. In Settings > Output is your recording encoder set to a hardware encoder.
2. How many cameras are you using, it's possible that you are trying to send too much video through the system if it's an older machine.
 

FerretBomb

Active Member
To answer your question, you'll want an nVidia GPU, preferably a Turing based unit. Meaning a GTX 1660, or RTX 20-series. Use NVENC (new) as your encoder to keep all the data on the GPU during compositing, even if you are not streaming with it. NEVER use an AMD GPU at this point for any production system. AMF is horrendous, and does not support the zero-copy tech that modern NVENC allows.

To expand on that, you may be getting rendering delay from a number of sources. Each of those c920s has to encode its video for transfer over the USB bus, and your CPU has to decode each video stream and transfer it to VRAM before it can be composited. You have several potential bottlenecks:
-Your USB subsystem. USB 2.0 is well-known for bandwidth choking even on a single c920 on a given host controller. Grab USBView and make sure each camera is on its own Host Controller (not hub) if possible. You may also be able to buy a USB expansion card to give the system more host controllers, depending on how many 'several' cameras is.
-Your CPU. An i5 probably can handle it, but you didn't list generation, so it's still a potential bottleneck, especially with 'several'.
-Your PCIe bus. Transferring that data to the GPU has to go across the internal bus, and it can run out of bandwidth too. Again, 'several'.
-Your GPU. Some just have terrible memory management. Not usually a problem unless you're on an old GTX 200-series.

The CHEAPEST GPU you can probably get away with is a GTX 1050. I would recommend splashing out a little more for the 1660, or a 1650 Super (NOT the non-super or Ti, they use the older Pascal NVENC core which is a significant step down in performance).

Spitball guess, since you aren't skipping frames on the iGPU, it'd more likely be an issue with moving the frames from system RAM to the GPU's VRAM. The iGPU just uses a shared system RAM memory window most times.

Really though, going from 4ms rendering times to 9ms times is a non-issue, and will not increase delay by a human-noticeable value.
You just need to stay under the frame timing deadline to avoid rendering delay (16ms for 60fps video, 33ms for 30fps video). You're well below that deadline from what you're saying... I honestly wouldn't even worry about it, if I were in your shoes. 4-5ms is so short, it's barely perceptible to a human.
 
Last edited:

Michael Berry

New Member
To answer your question, you'll want an nVidia GPU, preferably a Turing based unit. Meaning a GTX 1660, or RTX 20-series. Use NVENC (new) as your encoder to keep all the data on the GPU during compositing, even if you are not streaming with it. NEVER use an AMD GPU at this point for any production system. AMF is horrendous, and does not support the zero-copy tech that modern NVENC allows.

Thanks for the info and a further understanding of how OBS and the system, webcams, etc handle video. Right now I only have 2 webcams hooked up. A C920 and a C922. Since I'm just sending video to zoom and to keep resources low I'm only having the cameras capture at 864x480 resolution. I really wanted to get an NVIDIA GPU but all my local bestbuy had during this pandemic was AMD. I will try to see if I can order one somewhere and give it a shot.

To expand on that, you may be getting rendering delay from a number of sources. Each of those c920s has to encode its video for transfer over the USB bus, and your CPU has to decode each video stream and transfer it to VRAM before it can be composited. You have several potential bottlenecks:
-Your USB subsystem. USB 2.0 is well-known for bandwidth choking even on a single c920 on a given host controller. Grab USBView and make sure each camera is on its own Host Controller (not hub) if possible. You may also be able to buy a USB expansion card to give the system more host controllers, depending on how many 'several' cameras is.
-Your CPU. An i5 probably can handle it, but you didn't list generation, so it's still a potential bottleneck, especially with 'several'.
-Your PCIe bus. Transferring that data to the GPU has to go across the internal bus, and it can run out of bandwidth too. Again, 'several'.
-Your GPU. Some just have terrible memory management. Not usually a problem unless you're on an old GTX 200-series.

I think I have a 2nd Gen i5 because it is an i5-2400 CPU I have 8GB of ram with it. My hunch is that there is a bottleneck with the frames getting from the CPU to the GPU as in your "spitball guess" below. In this case does it mean that my system is just too old and I need an upgraded system/processor/motherboard?

I'm checking on the USB bandwidth issues... I downloaded the USBView tool and I see that I have two USB contollers. All of my devices are connected to one controller and the other has nothing connected.... I'm trying to figure out how to access the ports on the other controller on my machine and see if it helps.

The CHEAPEST GPU you can probably get away with is a GTX 1050. I would recommend splashing out a little more for the 1660, or a 1650 Super (NOT the non-super or Ti, they use the older Pascal NVENC core which is a significant step down in performance).

Spitball guess, since you aren't skipping frames on the iGPU, it'd more likely be an issue with moving the frames from system RAM to the GPU's VRAM. The iGPU just uses a shared system RAM memory window most times.

Really though, going from 4ms rendering times to 9ms times is a non-issue, and will not increase delay by a human-noticeable value.
You just need to stay under the frame timing deadline to avoid rendering delay (16ms for 60fps video, 33ms for 30fps video). You're well below that deadline from what you're saying... I honestly wouldn't even worry about it, if I were in your shoes. 4-5ms is so short, it's barely perceptible to a human.

Yeah, I'm ok with sub 15ms delay... my concern was that it seemed like the frames were piling up in a bottleneck and then I had lots of dropped frames. I was thinking if I'm going to replace hardware I want to try to get the right stuff instead of guessing since I don't fully understand what's going on.


I did try setting the hardware encoder under Settings > Output but I didn't see much difference and I didn't think that the output encoder had a lot to do with rendering the previews but now I see that it must have some relationship.
 

FerretBomb

Active Member
I think I have a 2nd Gen i5 because it is an i5-2400 CPU I have 8GB of ram with it. My hunch is that there is a bottleneck with the frames getting from the CPU to the GPU as in your "spitball guess" below. In this case does it mean that my system is just too old and I need an upgraded system/processor/motherboard?
Yes, that is a second-gen. It... probably should work? It's still very much on the older side. I'm on a 5th gen HEDT system and already feel the need to upgrade. But my fallback machine is a first-gen i7 and can handle two webcams. Then again, that supports triple-channel memory and the i5 only does dual, if it's set up correctly. You might consider spending $20 and getting a USB 3.0 PCIe expansion card for it to help spread the load.

I'm checking on the USB bandwidth issues... I downloaded the USBView tool and I see that I have two USB contollers. All of my devices are connected to one controller and the other has nothing connected.... I'm trying to figure out how to access the ports on the other controller on my machine and see if it helps.
In situations like that, the second UHCI may be dedicated for the front-mounted USB ports, or at least the headers on the motherboard that should connect to them, or 'extra' USB headers for a jump-slot header (a metal blank you fit to a slot on the back of the case, then plug into the motherboard). If it's a prebuilt system (yes it is, I forgot it's an Optiplex) you may not have anything connected to those headers on the motherboard at present. It's pretty easy to do with a little bit of care though.
I'd probably go with the USB 3.0 PCIe expansion card mentioned above at the same time. More connectivity is never a bad thing.

Yeah, I'm ok with sub 15ms delay... my concern was that it seemed like the frames were piling up in a bottleneck and then I had lots of dropped frames. I was thinking if I'm going to replace hardware I want to try to get the right stuff instead of guessing since I don't fully understand what's going on.
There are many types of frame issue, and the specific one points at where the problem is happening. Rendering delay/lag generally means that your GPU is overloaded. Encoder lag/skipped frames tends to mean that your CPU is overloaded or that you need to tweak some settings on the GPU encoder side. Dropped frames are 100% always a network issue. The only type you should be seeing is rendering delay, unless you're using a Display Capture and a Game Capture in the same scene (and it doesn't sound like you are, from your description).

I did try setting the hardware encoder under Settings > Output but I didn't see much difference and I didn't think that the output encoder had a lot to do with rendering the previews but now I see that it must have some relationship.
That's only going to help with an NVENC card; you mentioned having grabbed an AMD GPU for the moment. AMD GPUs cannot benefit from the Zero-copy tech that the new NVENC communication method now has available.

I would recommend taking a 30s-1m recording of your setup, and posting the logfile from that session here. It can't hurt, and will give us some better insight into what might be a choke or pain point. There's a pinned thread at the top of the forums explaining how to get a logfile uploaded. :)
 

Michael Berry

New Member
@FerretBomb I'm still working on this. I did steal a front mount USB header out of another Junk PC and hooked up one of my logitech cams up to it and it seems to have helped a little, plus another random weird USB problem with another device disappeared. I may still add a USB 3.0 controller but I'm not sure I want to give up the PCIe Slot that my NIC is in currently. I already returned the AMD card to BestBuy so I'm not able to produce any logs.

I'm thinking of buying an NVIDIA card of your recommendation. It seems like a 1650 Super is best bang for the buck. Also I could get a CPU upgrade to and Core i7-2600 for around $60. I'm not sure if its better at this point to look at buying a whole new more mordern tower though. But even if I did go that route the video card is still a good investment right?

At the moment my goal is to try to get latency down as much as possible. My wife is using this to do Music lessons over Zoom and right now she's having issues where they're talking over each other sometimes because of the latency.

I really appreciate your help :)
 

carlmmii

Active Member
The video card is definitely a good investment right now. Immediate use for your current system, and it can be brought forward (even if it's relegated to just being a stream encoder card).

To be honest though, the level of latency you just described there and the 5-15ms latency of frame rendering are on two completely different time scales. The render time is a red herring to the issue you're actually trying to solve here.

The actual latency chain you're having looks like this
- Audio/video input to OBS
- OBS output to Zoom
- Zoom output to the internet

That last step is going to be the biggest chunk of latency (up to 200ms usually). Since zoom should be using the actual audio device (not routed through OBS), this is the actual source of the "talking over each other" problem. If for some reason you are trying to route audio through OBS to zoom, try the direct method instead.

For the rest of the video chain, OBS output to Zoom would be on the order of up to 50ms usually, and camera input to OBS (to when displayed on preview) depends on the camera (can be up to 100ms)… and that's not figuring in any other delay from the camera's own processing (such as exposure, low-light settings, etc).

So... yeah. Fretting over the 10ms or so from rendering delay is a drop in the bucket.
 

FerretBomb

Active Member
Normally there should be more than one PCIe slot @Michael Berry. Does your motherboard not have a NIC built in? Or is it only 10/100 and you need gigabit? Was it damaged by a power surge/lightning strike? They're usually standard equipment.

If you never plan to game on it, the 1650 Super is a great choice. It's a bit weak when it comes to gaming performance, but if you're just using the system for streaming another source, the Turing core in it (not available in the non-Super, or Ti variants of the 1650) should work well. You can definitely carry it forward, again assuming that you never intend to game on the system, or any games are a bit older or light-weight.

Bumping from a second-gen i5 to an i7 would be a decided step up, yes. Really though, the GPU will take most of that load up. It's not necessary, but it would be a good idea to give yourself a little more capability... especially without needing to buy a new mobo and RAM.

Coming down to it, your system will continue to work competently, especially with the bumped-up GPU, but it's very, very much time to consider a full new build.
 

Michael Berry

New Member
Thanks so much for all of your help. I wanted to circle back to this post and let you know that I eventually did get the new 1650 Super card in the mail and I also upgraded to the i7 chip. I also put in an upgraded PSU for the video card.

My rendering latency is less than 1ms now. Also, I feel more confident that I'm not overloading this PC and have some headroom as far as the capacity goes. No more dropped frames due to rendering lag :) I think most of this was the upgrade to the GPU but I don't think the CPU upgrade hurt either.
 

roofrack

New Member
This is the most informative and helpful discussion on this subject I've read on the web so far. I have exactly the same issues myself and I had exactly the same objectives ie - lots of cameras and I wanted to understand where the weaknesses in my system were in order to direct resouces at the right part. i'm on the verge of a graphics card and CPU upgrade as well. My understanding, if it should add anything is that encoding is part of the process of bringing video in to OBS in a way in which it can work with it. OBS's preferred way of dealing with this is software, which is CPU intensive. Rendering is the process of outputting final video to stream, with PIP, overlays of text and animations, transitions and whatever else might be part of the mix. This type of work is what Graphics Cards are designed for. I do not think many GPUs even very old ones, would find the graphics output of OBS very taxing, especially when compared with a game. Some of the research I did early on said you didn't really need a card at all - and that Intel On Board GFX should do it all. And the results I've had with my machine tend to comfirm that. The CPU always blocks first.

The NVENC issue is bonus section on recent NVIDIA graphics cards that allows pretty fast and pretty good encoding. It is not part of the main card and if you don't use it, it is simply not used (as opposed to diverting part of the processor that would otherwise be used for rendering). It is not as good as OBS own software encoding - but you'd have to be a pro-broadcaster to tell the difference. This is a handy thing to have as it might give you some headroom should you find your CPU standing on tiptoes to encode your existing OBS inputs - if you should add another one for example. My understanding would be that it would be better to use your CPU capacity and only use NVENC if you had to.

This is my understanding of what is happening encoding/rendering wise within OBS. I have gleaned and scavenged this information from EposVox and Harris Heller and this forum and I'd be delighted if anyone could confirm or deny whether I have done so correctly.

I have to say that dealing with tech that is constantly on the verge of falling over is the only way to really learn what's going on. Six weeks ago I knew nothing whatsoever about streaming. Thanks for the read.
 
Top