V-Sync: Driver or Game?

Everything about displays and monitors. 120Hz, 144Hz, 240Hz, 4K, 1440p, input lag, display shopping, monitor purchase decisions, compare, versus, debate, and more. Questions? Just ask!
Glide
Posts: 280
Joined: 24 Mar 2015, 20:33

Re: V-Sync: Driver or Game?

Post by Glide » 27 Mar 2015, 18:34

MrBonk wrote:But the rule of the thumb for me in all of my experiences is that most games built in Vsync is subpar. Especially UE3 games.
The best frame pacing will always be a combination of>

If 60+hz| In game vsync disabled. Frame cap set with RTSS to your desired refresh. Vsync forced through drivers.
If 30hz on 60hz monitors| In game vsync disabled. Frame cap set with RTSS to 30. Maximum pre-rendered frames set to 1 in drivers and 1/2 refresh vsync as well.
Using the RTSS frame limiter did not really seem to improve things over the driver settings in my initial tests.
I've returned to this and am now testing with the FRAPS benchmark feature, because it records every frame rather than polling at 100ms, which gives a better look into performance.
For graphing the results from FRAPS, I found FRAFS to be useful.

I'm still open to suggestions if anyone knows of a better way of doing this. Having to manually save and then graph the results is less convenient than Afterburner where I can just alt-tab to it and see the results directly. I also prefer the in-game stats that Afterburner provides. (GPU load, Memory usage, CPU load, Frame Rate/Time etc.)

One of the nice things about FRAPS though is that you can specify a duration, so I just set a 2 minute benchmark run of the Junkyard chapter in the game, which is a cutscene that lasts about 1:40, and then I leave it static for the last 20 seconds or so - if anyone is looking to replicate these results.
I'm still interested in seeing AMD results to see whether the frame-pacing is any better by default, and if they provide the tools required to improve it.

What I will say before posting these results is that I had to enable the "Custom Direct3D support" option in RTSS in order to use it at the same time as FRAPS or else I would just get a black screen - even with the OSD disabled - so I don't know if that affected the RTSS results at all.

What my testing certainly shows is that even if you're using an external framerate limiter like RTSS, you still need to limit the maximum number of pre-rendered frames to 1.

These are the results that I got just using RTSS without changing that setting.
They are hardly any better than running the game without the framerate limiter.
Compared against my original results, you can see how Afterburner was only catching one half of the frame-time variation, where FRAPS displays the oscillation between early and late presentation which explains how it can still read "60 FPS".

Here is the rest of the testing:
I'm not sure that the frame rate caps are nearly as important as reducing the maximum number of pre-rendered frames to 1 and forcing v-sync in the driver instead of enabling it in the game.
If anything, performance seems like it may be worse with the framerate caps in place.

RTSS had to be capped at 61 FPS, because 60 was allowing it to tear. (I always have Adaptive V-Sync enabled)
And enabling the RTSS cap shows the most variance at the end of all the tests, which is basically just a static scene.

Of course that may not always be the case. Perhaps in some games, it is still important to be limiting the maximum framerate.
But here, it does not seem to be beneficial.

MrBonk
Posts: 11
Joined: 27 Mar 2015, 03:55

Re: V-Sync: Driver or Game?

Post by MrBonk » 28 Mar 2015, 22:58

I can't agree with that in all of my own testing.

9/10 times i've never had a single issue with frame pacing after doing what I mentioned. And performance has always been better than without. I've tried my own tests with using vsync+frame limiter and almost always without it performance is worse. Microstuttering is easily visible for example and more spikes are visible.

Using the frame cap in conjunction and it is gone and frame times even if only at 100ms are a flat line. And looking at the log of frames monitored variance is well within the margin of error to not be a problem. We are talking sub 1.5ms difference http://i4.minus.com/iIpwzyJruGU6m.png (Spike is from a wave spawning or a wave ending in this example however. And this example is also running without vsync)

I can tell with my eye even when a single frame drops for a split second or if the delivery is off creating microstuttering . And i've never seen it happen with RTSS unless the game itself has an issue. (FFXIII for example, or whatever engine Bethesda uses that refreshes internally at 64hz that almost always causes problems no matter what.) or there is a problem somewhere else like a CPU bottleneck.


I've never used Adaptive vsync so that may also be a factor in the results.
Tearing is not an acceptable alternative for me. So I don't use it. (Only no vsync in MP games)


As well, using FRAPS+RTSS at the same itself could be muddying the results and causing a conflict. It's trying to record frame output while one is trying to control it at the same time. And like I mentioned above, i've also done tests with FRAPS and the deltas in frames are well within the margin of being close enough as not to cause a visible difference. A few ms at best.

To add to that, different GPUs produce different results. And with the 7XX series and onward a lot of people including myself have had a lot of issues from GPU boost not working properly and causing performance problems. ESPECIALLY in low usage scenarios (Such as a capped framerate or when using vsync). Modifying the BIOS to use a fixed clock solved the problems I was having from that.



I also forgot to mention, that you can run RTSS solo and use frame capping without AB and eliminate that as a factor as well. (Simply kill AB and RTSS together and run RTSS itself "Program Files (X86)/Riva Tuner Statistics server/RTSS.exe"

Glide
Posts: 280
Joined: 24 Mar 2015, 20:33

Re: V-Sync: Driver or Game?

Post by Glide » 29 Mar 2015, 00:13

MrBonk wrote:I can't agree with that in all of my own testing.
9/10 times i've never had a single issue with frame pacing after doing what I mentioned.
Well keep in mind that this is one specific game that I have been posting results from - and one which was giving me a lot of trouble.
While UE3 games often seem to have bad frame pacing, I had never seen it be this bad.

I have done a little testing of other games running on different engines (Unity/Source/Starbreeze Engine) and either subjectively or in measurements, I have not seen a benefit from using an external FPS cap in addition to V-Sync.
MrBonk wrote:And performance has always been better than without. I've tried my own tests with using vsync+frame limiter and almost always without it performance is worse. Microstuttering is easily visible for example and more spikes are visible.
Believe me, I'm very susceptible to stuttering. If it was stuttering, or if RTSS was somehow improving the situation, I would have noticed. But it's almost perfectly fluid even without using the RTSS limiter - and as you can see in the results posted above, it actually gets a bit worse with the limiter in place.
MrBonk wrote:Using the frame cap in conjunction and it is gone and frame times even if only at 100ms are a flat line. And looking at the log of frames monitored variance is well within the margin of error to not be a problem. We are talking sub 1.5ms difference http://i4.minus.com/iIpwzyJruGU6m.png (Spike is from a wave spawning or a wave ending in this example however. And this example is also running without vsync)
Well there are two things which are important here.

Firstly, the minimum polling rate of Afterburner is limited to 100ms. This means that it's only capturing every sixth frame or so at 60 FPS.
As demonstrated above, this can give misleading results, while FRAPS is logging every frame.
Here you can see where Afterburner only captures the late frames, and not the ones which are early: Afterburner/FRAPS
This is still not ideal, but it seems like the best option that costs zero dollars, compared to the expense and complexity of setting up FCAT. (though I think their examples vs FRAPS are a bit unrealistic to justify their setup cost)

Secondly, if you are running without V-Sync, that can have a huge impact on the results. Frame presentation seems to be a lot smoother when using an external cap as long as V-Sync is disabled. It is the interaction between the cap and V-Sync which can make it less fluid.

MrBonk wrote:I've never used Adaptive vsync so that may also be a factor in the results. Tearing is not an acceptable alternative for me. So I don't use it. (Only no vsync in MP games)
I don't really understand this.
You say that tearing is not acceptable, yet you're using a framerate cap with V-Sync off?

Adaptive-Sync means that if performance ever does drop below 60 FPS, which I try to avoid wherever possible, the framerate does not immediately drop from 60 to 30, at the cost of tearing for a fraction of a second. It is the lesser of two evils.

Unfortunately there are no G-Sync or Adaptive-Sync televisions out there. Low contrast TN/IPS monitors are not an option for me.
I'm too used to large high contrast VA panels. (5000:1 native rather than 1000:1, plus 100 zones of local dimming)
MrBonk wrote:I also forgot to mention, that you can run RTSS solo and use frame capping without AB and eliminate that as a factor as well. (Simply kill AB and RTSS together and run RTSS itself "Program Files (X86)/Riva Tuner Statistics server/RTSS.exe"
Yes, I was running RTSS on its own.

User avatar
masterotaku
Posts: 436
Joined: 20 Dec 2013, 04:01

Re: V-Sync: Driver or Game?

Post by masterotaku » 02 Apr 2015, 05:23

I started playing Alien Isolation yesterday. With vsync on, it needs fps capped at the refresh rate, or else it stutters a lot. Ingame and forced vsync are equally smooth in this game. It just needs the cap.
CPU: Intel Core i7 7700K @ 4.9GHz
GPU: Gainward Phoenix 1080 GLH
RAM: GSkill Ripjaws Z 3866MHz CL19
Motherboard: Gigabyte Gaming M5 Z270
Monitor: Asus PG278QR

MrBonk
Posts: 11
Joined: 27 Mar 2015, 03:55

Re: V-Sync: Driver or Game?

Post by MrBonk » 10 Apr 2015, 01:41

Update: I spoke with Unwinder about modifying Afterburner's to allow sub 100ms polling for more accurate monitoring without interference.

(Also: RTSS is technically the hardware monitoring part, which is what you need to monitor anything with AB such as framerate or use the OSD. So using FRAPS on top of it will most likely interfere. Pending any correction by the man himself. I have pointed him to this thread as well)

With a polling period of 1ms, Vsync forced on from drivers + Pre render 1 + a 60FPS cap from RTSS with a title that has a lot of problems as is(Final Fantasy XIII)
Shows standing still that the amount of variance is extremely small(The gaps are because there are no frames rendered in those samples. Frames are rendered 59/60 times a second, so obviously only every 16.x ms
Image

Here is the raw data of 59 unique frame samples over 1 second (Ignore the spike. Is unrelated)
16.666
16.723
16.666
16.955
16.666
16.666
16.666
16.666
16.769
16.666
16.666
16.701
16.900
16.666
16.676
16.692
16.710
16.728
16.717
16.884
16.666
16.883
16.666
16.666
16.666
16.666
16.702
16.732
16.707
16.750
16.976
16.666
16.666
17.006
16.708
16.666
16.666
27.485
16.666
16.666
16.666
16.666
16.666
16.666
16.666
16.666
16.666
16.666
16.666
16.746
16.666
16.666
16.666
16.666
16.666
16.666
16.666
16.666
16.666

Now here's a graph without the cap
Image
You can already see there is a lot more variance

Here's another full second of frames
16.154
16.474
17.228
16.070
17.996
15.969
16.399
16.766
16.781
16.129
17.034
16.765
17.449
16.049
16.959
16.741
16.197
16.821
17.042
17.521
15.603
17.141
16.219
18.109
15.617
16.115
17.366
16.175
16.554
16.703
17.227
17.462
15.652
16.628
17.408
16.008
16.704
16.746
16.889
16.556
17.251
16.243
16.692
16.725
16.682
16.852
16.719
16.615
16.750
16.724
16.713
16.762
16.796
16.636
16.719
16.770
16.651
16.739
16.777
16.660

Sparky
Posts: 682
Joined: 15 Jan 2014, 02:29

Re: V-Sync: Driver or Game?

Post by Sparky » 10 Apr 2015, 08:06

Driver vs game doesn't matter for v-sync, but it does matter for framerate caps. In game framerate caps are always going to be better than a driver based cap, because if the game engine is waiting on the driver, that's unnecessary latency being added.

If you use v-sync without a framrate cap, and your vsync off framerate is over your refresh rate, you're going to get a lot of input lag(multiply your refresh interval by about 5 for an estimated minimum).

Glide
Posts: 280
Joined: 24 Mar 2015, 20:33

Re: V-Sync: Driver or Game?

Post by Glide » 11 Apr 2015, 02:26

MrBonk wrote:Update: I spoke with Unwinder about modifying Afterburner's to allow sub 100ms polling for more accurate monitoring without interference.
That's awesome! Is it available in a public build yet?
Sparky wrote:Driver vs game doesn't matter for v-sync, but it does matter for framerate caps. In game framerate caps are always going to be better than a driver based cap, because if the game engine is waiting on the driver, that's unnecessary latency being added.
Do we know that for sure now? Because NVIDIA's driver-based V-Sync can certainly produce more stable frame times, and I will always use that instead of in-game V-Sync if there is no penalty for doing so.
Sparky wrote:If you use v-sync without a framrate cap, and your vsync off framerate is over your refresh rate, you're going to get a lot of input lag(multiply your refresh interval by about 5 for an estimated minimum).
I was under the impression that an external framerate cap added input lag though.
Isn't it a case of whether you would have more or less than one frame of lag?
E.g. If you're only running at 70 FPS and locked to 60Hz, you would be better off just using V-Sync, but if you could run the game at 90 FPS+ at 60Hz you should use an external cap.

I'm still curious to see whether NVIDIA's driver-based frame capping is better or worse than RTSS.
RTSS seems like it may result in slightly better frame-pacing, at the cost of adding a frame of latency.
I haven't seen anyone test whether NVIDIA's solution also introduces that latency. I assume it must, but I'd prefer to see data than simply assume.

Sparky
Posts: 682
Joined: 15 Jan 2014, 02:29

Re: V-Sync: Driver or Game?

Post by Sparky » 11 Apr 2015, 03:12

Glide wrote:
Sparky wrote:Driver vs game doesn't matter for v-sync, but it does matter for framerate caps. In game framerate caps are always going to be better than a driver based cap, because if the game engine is waiting on the driver, that's unnecessary latency being added.
Do we know that for sure now? Because NVIDIA's driver-based V-Sync can certainly produce more stable frame times, and I will always use that instead of in-game V-Sync if there is no penalty for doing so.
I don't have an Nvidia card to test right now, but a driver based cap cannot be lower latency than an in-game cap. There's also a tradeoff between hiding stutter(stable frame times) and minimizing latency(eliminating buffering).
Sparky wrote:If you use v-sync without a framrate cap, and your vsync off framerate is over your refresh rate, you're going to get a lot of input lag(multiply your refresh interval by about 5 for an estimated minimum).
I was under the impression that an external framerate cap added input lag though.
It does, but not as much as uncapped v-sync. The downside of (simple) framerate caps is that you miss some v-sync deadlines, causing judder. Maybe Nvidia is really clever about how they limit framerates, but there's still going to be some penalty(hence g-sync). Here's a chart(radeonpro framerate cap isn't on the chart, but it's about 1 frame slower than rivatuner, and any framerate cap over 85.2 is equivalent to nocap, when v-sync is enabled): Image
Isn't it a case of whether you would have more or less than one frame of lag?
E.g. If you're only running at 70 FPS and locked to 60Hz, you would be better off just using V-Sync, but if you could run the game at 90 FPS+ at 60Hz you should use an external cap.

I'm still curious to see whether NVIDIA's driver-based frame capping is better or worse than RTSS.
RTSS seems like it may result in slightly better frame-pacing, at the cost of adding a frame of latency.
I haven't seen anyone test whether NVIDIA's solution also introduces that latency. I assume it must, but I'd prefer to see data than simply assume.
As far as v-sync is concerned 70fps is identical to 90fps, If your pipeline is allowed to push frames faster than your monitor accepts them, your graphics pipeline gets congested and you see a huge increase in latency. As for nvidia's driver cap vs RTSS, maybe flood or stirner can test that.

MrBonk
Posts: 11
Joined: 27 Mar 2015, 03:55

Re: V-Sync: Driver or Game?

Post by MrBonk » 11 Apr 2015, 03:57

Sparky wrote:Driver vs game doesn't matter for v-sync, but it does matter for framerate caps. In game framerate caps are always going to be better than a driver based cap, because if the game engine is waiting on the driver, that's unnecessary latency being added.

If you use v-sync without a framrate cap, and your vsync off framerate is over your refresh rate, you're going to get a lot of input lag(multiply your refresh interval by about 5 for an estimated minimum).
I beg to differ for the most part. I've experienced several instances where in game vsync is a crapshoot entirely in terms of stability. Same with frame caps. A lot are unstable. Some aren't. But a lot are.

The latency being added is insignificant to me unless you are playing an online game or some kind of game where every ms counts.

Stability is more important than a few ms of input lag being added for me for most uses. For a MP game, latency would again obviously be more important.

In a game like CSGO , which actually has a decent framecap solution with stability, it's not needed.
_____________________________________________________________________________________

Also: Nvidia's built in framecap that you can use with Nvidia Inspector for example, in all of my testing over time hasn't been great where stability is concerned compared to a good in Engine solution or RTSS. There is a lot of microstuttering every time i've tried to use it. Using it to cap to 1 frame below refresh decreases latency a lot from what I remember, but fluidity and stability were very poor.
Glide wrote:
MrBonk wrote:Update: I spoke with Unwinder about modifying Afterburner's to allow sub 100ms polling for more accurate monitoring without interference.
That's awesome! Is it available in a public build yet?
It will be available in the next public beta IIRC

Here's some quotes from him
To get even more accurate results with such polling rate change TimerRes from 16ms to 1ms in CFG. It will increase timing accuracy.
On a side note, it was rather safe to use 100ms for your task as well because AB doesn't display immediate frame time - it is displaying MAXIMUM frame time between two polling events. So it is able to catch absolutely all spikes effectively on such low polling rate as well.

User avatar
masterotaku
Posts: 436
Joined: 20 Dec 2013, 04:01

Re: V-Sync: Driver or Game?

Post by masterotaku » 11 Apr 2015, 04:23

MrBonk wrote:Update: I spoke with Unwinder about modifying Afterburner's to allow sub 100ms polling for more accurate monitoring without interference.
Decimal fps caps in RTSS (with at least 0.01fps precision, 0.001 if possible) would be great too :lol: . And the max fps cap being unlimited instead of 200. If you could tell him that, I'd appreciate it.
CPU: Intel Core i7 7700K @ 4.9GHz
GPU: Gainward Phoenix 1080 GLH
RAM: GSkill Ripjaws Z 3866MHz CL19
Motherboard: Gigabyte Gaming M5 Z270
Monitor: Asus PG278QR

Post Reply