Question / Help Render lag/performance issue

cdrgary

New Member
I'll prefixthis by saying I don't need any explanations about video encoders and hardware load that are littered all over every post I've read on this issue. I have a CS degree, I've written compression algorithms, I know my hardware architecture pretty damn well. I wouldn't come here seeking advice if I hadn't investigated pretty thoroughly myself.

I'm running:
Windows 7 64 bit
GTX 1080, Driver 836.47
i7 6700k @ 4.5 GHZ
32 GB 3200 MHZ CAS 16 RAM
1 TB SSD (SATA, ~300 MBps sequential write)
144Hz ASUS ROG Swift(via display port, tested with and without G-Sync runnning) + additional monitors @ 60 Hz

The issue is that I'm only able to get a peak of 30ish FPS in OBS, with 60 FPS as the target. Even with 30 FPS as the target I get dips below 30. This isn't just while recording. This is just OBS running, at all. With preview enabled, disabled, in either case, I can't get a decent framerate. Even with no other applications running, just idling on desktop. CPU usage in both OBS and task manager show ~2%. I've tried changing priority. More than 12 GB of memory is free and unallocated while testing. GPU load is negligible. GPU-Z of course also gives readouts on things like bus load as well, the difference between OBS running(the program being launched at all) and not is about 5%. This roughly the expected load, if you calculate the raw frame data (2560x1440x32bits per pixel x the reported 30 fps) against the 16 GB/s bandwidth of PCIe 3.0 x16.

And importantly, from the stats monitor, all of this shows as rendering lag(at about 50%)

What's more interesting is the effect of having the program open while running a game. This was tested against with PUBG running, and *I know,* PUBG and performance issues. This isn't about fps drops, but *why* they're occuring. See, what's interesting is that this happens without the encoder, without any encoder, I've tried with x264, QSV and NVENC, running at all. Just merely having OBS open. And this isn't an issue of the GPU, being already at 100% load, being pushed farther. No, it's far more interesting. Normally I'd see 99% GPU load in PUBG and ~70 fps. Here I'm seeing ~30 fps....and 60% GPU load. The framerate drop is entirely explained, in the sense that our monitoring( GPU-Z) is indicating the GPU simply isn't doing anything for about 1/3rd of the time. What could stall the render pipeline? Most obviously PCIe bus load hitting 100% load, blocking instructions being issued. But alas, bus load is barely 40%, and we see, both calculated and observed, OBS's impact on this is negligible. 100% CPU load? Such that the game engine can't issue the API calls to DX/GL? ( I've written multi-threaded game engines, I know exactly how this works) Alas, CPU load is only around 50%, and only slightly higher than it would be running the game otherwise.
OBS simply existing as a process is stalling the GPU, and doing so without maxing out any subsystem that can easily be monitored. At this point my only guesses are some sort of blocking, synchronous system call to fetch the frames that's in turn stalling the driver from issuing draw calls from the game, or some sort of really weird L3 cache thrashing issue that's stalling the main game thread in a harder to detect way, that doesn't manifest directly as load %.

Really I'm here hoping someone else has seen this sort of inexplicable lag before, that manifests despite having ample free system resources, and despite not causing any measurable load. And further hoping of course that there's a fix.
 

Attachments

  • 2017-09-21 02-27-07.txt
    29.4 KB · Views: 12
D

Deleted member 121471

For reference, I own a Ryzen 7 1700 and RX 580, which is a slower graphics card than yours, and can stream consistently at 720p@60FPS or record at 1080p@60FPS, depending on what my sources are. I used to have similar issues with my setup.

The following steps have helped me achieve these results:

Run OBS as admin
Enable Vsync ingame with monitor refresh rate set@60Hz or frame rate limiters set to 60FPS (very important)
Faster/fast preset for 720p@60FPS or Very Fast/Faster for 1080p@60FPS, depending on what I'm recording.
"High performance" Power plan
Disabling Windows Game Mode.

Also, try using "game capture" instead of "display capture".
 
Last edited by a moderator:
Top