OBS causes framerate drops in game after about 30 minutes, even when not recording

Marsh

New Member

I'm having a problem where my FPS will drop suddenly after OBS has been open a while (30 minutes or so,) with no dropped or missed frames, even if not recording. It will go away if I either close OBS or disable vsync in game (Factorio.) The problem is this will create large stutters and tears that are worse than the lower FPS. I've confirmed that the CPU and GPU are not clocking down. The game is perfectly smooth so long as OBS is not running. I'm on Win 11, 10900k 3080ti, both water cooled, running stock speeds. Passes memtest86.

I've changed all the various settings with no effect. I've tried everything I've read about that could cause problems and nothing helps. Game mode, gpu scheduler, browser acceleration, different frame rates, ect. Both the primary and secondary screen are at the exact same refresh. If I close OBS, the fps returns to normal. I've been messing with this for weeks and have not found a solution.
 

PaiSand

Active Member
Please follow directions and recommendations on the analyzer:

Windows 11 gives issues to many people too. Until the OS is mature enough for production it's wise to stay with win10.
 

Marsh

New Member
I've already made all these changes and they don't help. I changed them in that way to try to see if anything helped. This is a new computer with win 11 so I can't really go back to anything.
 

Lawrence_SoCal

Active Member
your recording to MP4 despite the big red warning about not doing so... ??

Just at a high level/for reference
- when OBS is running, then a lot of the real-time video encoding is taking place, regardless of streaming/recording.
- If you have Studio Mode enabled, then you are doing 2X the computational rendering workload.
- And you are doing what I presume is custom recording settings at 4K with CPU encoding (vs offloading with NVENC)
so yea, OBS while running is presumably creating a material workload on your PC

To confirm, switch to a scene with no audio source and no video capture/display (blank scene, no plugin overlays, audio filters/effects, etc).. as in a scene with maybe only a static picture, or just a native Text box (saying 'test' or similar). At that point, OBS CPU usage should drop significantly, and I'd bet FPS returns..
 

sandrix

Member
аnd Untick the Enable Browser Source Hardware Acceleration checkbox
Enable-browser-source.png
 

PaiSand

Active Member
Browser Source Hardware Acceleration must be checked (ticked) in order to free system resources needed for something else, more if you see he has a 3080ti and a i9-10900kf with 64Gb of RAM.

@Marsh please run again the Auto-configuration Wizard (tools menu) and apply the sugested settings. Now restart OBS and use simple output mode selecting one of the quality presets. Test.
 

sandrix

Member
In my practice, there were incidents where exactly "Source Hardware Acceleration" caused performance drops for users, even on a high-performance system. Just as an option.
By default, it's best to leave it enabled.
 

Marsh

New Member

The framerate drops seem to have lessened, but the output file looks like garbage. I changed the settings back to record in 4K and it uses 65%(!!!!!!!) of my GPU! Is there going to be anything left for the game? You really shouldn't be using nvenc if you're at 4K and already GPU limited. My CPU only needs to load about 25% for the same task, and it's largely idle during 4K games.

The framerate still fluctuates, just not as bad as with software encoding. It perhaps goes up/down by 1 fps as opposed to 20. Sync seems to be broken between OBS and win 11. Perhaps using gpu encoding uses a different method that does not encounter the same bug. I had an older win 7 computer record the same game, at the same quality, at 4k, WITH SOFTWARE ENCODING, with no framerate issues.

I don't consider using 65% of my GPU for smooth-ish encoding a solution. That's not "barely noticeable."

The framerate can be perfectly smooth, a rock solid hard 60 fps. And then it just... stops being smooth. It's like sync just breaks and one or more frames per second miss the vsync timing. And then it just... fixes itself? It's like the computer decided to do an update in the middle of recording, except that it didn't. CPU and GPU usage is flat.

In game Factoio is attributing frame time delay to waiting on vsync. (Factorio has a very detailed frame time update chart that tells you exactly how many microseconds each element of the game took.) Normally something called "Flip" takes up most of the time. This is the effect of vsync, and it's the GPU waiting for the next frame to start. When playing without OBS, normally it's about 14ms, which makes sense because the frame normally does not take up much GPU time, which is getting close to the 16.66ms a frame has in it. This is Factorio after all.

But you open OBS and now Flip is around 10ms, meaning a good 4ms is being taken by OBS, without even recording at all. Just having it open is consuming a 25% of my GPU's power. That seems... wrong. This is a 3080ti. But then vsync seems to break mid recording. Where you go back to look at Flip and it's gone from ~10ms to around 0.250ms. According to Factorio this implies the GPU is getting maxed out. (basically no waiting had to occur between frames) If you alt-tab away from the game to do something such as write this post, and then tab back, Flip returns to it's pre-tanked value. You can watch it go back in real time. But the GPU wasn't being maxed out. I have a second monitor where I can monitor these things and the load has remained constant.

It's like OBS is hijacking sync and disabling it (or win 11 doing the same,) which causes it to start missing sync timings, causing the FPS to drop suddenly. This is classic vsync. If you're at 60 fps and you miss a frame, for that moment, now you're at 30 fps. If it happens several times a second you'll get an extremely rough number somewhere between 60 and 30. The critical thing here is that everything is fine so long as OBS isn't open.
 

Marsh

New Member
your recording to MP4 despite the big red warning about not doing so... ??

Just at a high level/for reference
- when OBS is running, then a lot of the real-time video encoding is taking place, regardless of streaming/recording.
- If you have Studio Mode enabled, then you are doing 2X the computational rendering workload.
- And you are doing what I presume is custom recording settings at 4K with CPU encoding (vs offloading with NVENC)
so yea, OBS while running is presumably creating a material workload on your PC

To confirm, switch to a scene with no audio source and no video capture/display (blank scene, no plugin overlays, audio filters/effects, etc).. as in a scene with maybe only a static picture, or just a native Text box (saying 'test' or similar). At that point, OBS CPU usage should drop significantly, and I'd bet FPS returns..
Lol less than 1% cpu usage is a "material workload" to you?
 

PaiSand

Active Member
 

Marsh

New Member
It doesn't matter if the GPU scheduler is on or off, I said I tested all of these settings already. But here you go if you want to see a log with GPU scheduler turned off: (The problem remains)


I'm not sure about the max audio buffering. As you can see by the task manager, resource usage is both very consistent and far below 100%:

 
Top