Realworld Testing w/ High Speed Video

Inspired by Mythbusters, we wanted to use a high speed camera to really measure what's happening with millisecond resolution. We were disappointed when we first looked into this, as "real" high speed cameras cost in excess of 10k USD. But then we stumbled upon the Casio Exilim EX-F1 and it's horrific quality but hugely fast video capability (actually, quality isn't that bad in VERY high light situations). At 1200 frames per second, we get video output at a resolution of 336x96, which is freaking tiny. But it's enough. All we need to do is count the frames between two events and multiply it by 0.833 (the number of milliseconds per frame) and we can assess the duration of incredibly short term events.

First up, we're looking at response time for the Dell 3007WFP display. Rather than relying on the manufacturer reported response time (which look at a limited number of cases and likely don't include worst case performance), we're using our camera to watch a few frames go by and observe how long it takes for pixels to transition from one color to the next. As we can see in the video, it takes nearly a full frame (~16ms) for some colors to change (pay attention to the yellow and black stripes with the orange lettering at the bottom of the screen). We timescaled this video down 10x over the already very slow 2.5% realtime speed to 0.25% realtime to help in seeing what's going on.

Getting to the actual game testing, we wanted to look at two titles: one a twitch shooter, and another with notoriously bad input lag. We chose Team Fortress 2 for our twitch shooter and Fallout 3 for our laggy game. We also did further testing on a CRT with TF2 just to see how low we could actually get input latency (with some pretty impressive results). Our test methodology was to set up the camera to capture both input generation (either a mouse click or move) and the display. The resolution of our camera was such that we had to really work to cram everything in the frame, but we got enough to be useful. We ran multiple tests and counted frames between when the hand hit the mouse and when we could see the result on the monitor.

For Team Fortress 2 we looked at three scenarios: no vsync, vsync enabled, and vsync enabled with our flip queue (render ahead / pre-rendered frames) set to zero. Our frametime at 2560x1600 was typically 9ms give or take small amount (but we never dropped below 100 FPS let alone refresh rate) with our GTX 280 remaining the performance bottleneck (CPU time was still significantly less than frametime).

First we'll look at the case with no vsync. Look for when the finger stops moving to when the shotgun blast appears on the wall (Valve makes sure to calculate the hit before it even starts the gun firing animation; sometimes hit and gun fire happen in the same frame, sometimes they are one frame separated). This certainly isn't frame by frame, but you should be able to download the clip from youtube and step through it yourself if you are so inclined.

This test took about 45 frames: between 37ms and 38ms from input generation to display. This is very good considering what we predicted as a best case. Average over multiple runs was a little higher, resulting in 51ms of typical input lag plus or minus about 12ms (our maximum being 63ms). This fluctuation is due to how all the factors we talked about either line up or don't.

When we turn on vsync, we see a lot more delay.

We can see even better how the hit happens before the gunfire animation again. This is very key in any twitch shooter. The lag is significantly longer with vsync enabled. This example shows about 94 or 95 frames (~79ms) input lag, which was our lowest input lag time in this test. Our average was about 89ms ranging up to 96ms at maximum. In this case, we lose the input latency advantage of no vsync but we gain more consistent input lag times and no tearing.

But we also decided to check and make sure that we weren't getting stuck with any penalties due to flip queuing as the average latency increase seemed a little high. So we set maximum pre-rendered frames to zero in the NVIDIA control panel (formerly maximum render ahead) to see what happened. Whenever your framerate is always higher than your refresh rate you never want any flip queueing going on (unless you are using a multiGPU configuration). So let's check it out.

And we see 70ms as our new best. Our worst case is 85ms, which is better than our previous average. Average latency here is 76ms +/- about 6ms (with the one 85ms exception). From this data, it seems as though Valve uses a 1 frame flip queue (1 frame render ahead) when vsync is enabled unless it is forced off in the driver. When the game has framerates of less than the refresh rate then this is fine, but when framerate is always higher than refresh it will absolutely incur a performance penalty along the lines of what we are seeing here.

For those who want vsync in TF2 and have consistently >60fps performance without multiGPU, absolutely set the flip queue to zero in the driver.

Next up is our Fallout 3 test and we'll compare a notoriously laggy game with a notoriously responsive game. Our framerate in this game was consistently between 38 and 45 frames per second during the testing, meaning that frametime will play a bigger role as it will add at something between 22ms and 27ms of latency.

And we have 136ms. And this test was much more consistent with our average latency being 136ms as well. Our low was 130ms and our high was 142ms, giving us the same tight spread of +/- 6ms we saw with TF2 and vsync, only vsync was not enabled here (which suggests some internal rate monitoring to me). Of course, this variability is now a much lower percentage of the overall input lag; not that that offers much consolation.

The number of complaints we've seen on the net about Fallout 3 and input lag (though notably a subjective improvement over Oblivion) combined with our own experience lead us to believe that somewhere between TF2's snappy 89ms worst case input latency (which we still couldn't feel) and Fallout 3's ~50% longer latency we cross the point of perceptibility and distraction. That 100ms number certainly looks like a good point for developers to keep input latency below.

Let's take a look at what happens when we turn on vsync.

Once again, 136ms. Our input lag stats were actually the same. And yes we rechecked to make sure vsync was enabled here and disabled there. Since Oblivion benefited from reducing the maximum number of frames rendered ahead, we tested this out as well. When set to 1 or 0 we saw no change in performance with Fallout 3 at least in this test. It's unclear whether different settings or performance levels would benefit, but for now it seems like Fallout 3 does really well at producing a consistently high input lag.

So that does it for our LCD testing. But we did want to learn whether or not the LCD panel added any extra delay over a CRT display. So we pulled out a Sony GDM F-500 encased in the purple and grey of a Sun monitor from an age gone by. We tested at lower resolutions as the display couldn't muster anything closer to 2560x1600, but at 1600x1200@60Hz our numbers still made sense comparatively: we would expect them to be a little lower but not by much.

So, our average here is about 43ms, which is a lower average than on the Dell LCD. Our minimum is 35ms and max is 52ms. In the best case, 35ms (for the CRT) isn't much better than 37ms (for the LCD) at all. Our worst case in this test was much better (as was our average) than the LCD. But it's clear that the LCD is capable of input latency as low as the test with this CRT. We could (and likely do) have an advantage on the CRT side due to resolution. We do have to consider that framerate was higher for the CRT test. It is likely that this difference reduced our worst case and average performance.

But let's take a look at the CRT with vsync.

In this test our best case is 78ms and worst case is 88ms. The average is 84ms. This is, again, very similar in worst case to the LCD test, but the average case is less better this time around. This makes sense as vsync normalizes performance to 60FPS but there may still be a slight advantage for the lower resolution. It seems as if the Dell 3007WFP isn't significantly disadvantaged when compared to a CRT.

But there is one more advantage over LCD panels: refresh rate. We tested 120Hz, though we did have to lower resolution once more to make it work. This will increase performance on its own, but the results are impressive.

With an average of 25ms input latency, minimum of 17ms and maximum of 29ms, the results here show an incredible impact on input latency when running at a higher framerate and refresh rate. These numbers come in really low. The 1152x864 resolution does provide about 200 FPS which will also have an impact on latency, but the fact that 1600x1200 had a higher framerate than 2560x1600 but showed similar latencies, we suspect that the limit was refresh rate. Although it could be that the higher refresh rate was able to allow the advantages of the higher framerate to shine through.

Either way, this is incredibly low input lag.

Scanout and the Display Combating Input Lag and Final Words
Comments Locked

85 Comments

View All Comments

  • snarfbot - Friday, July 17, 2009 - link

    i have a crt and a plasma tv, both essentially lag free.

    my friends have tn monitors, also no perceivable lag.

    the worst offender is my friends samsung tv, its noticeably laggy.

    but no where near as bad as wireless mice. they gotta be in the 30+ms region.
  • nevbie - Friday, July 17, 2009 - link

    My mouse wire is about the same length as my monitor cable. It's too bad the latter doesn't have same relative bandwidth.

    1. But 16ms? Is it still around 16ms if the resolution is halved, which would cut the amount of data per frame to 1/4, or is the 16ms some kind of worst case?

    2. Does the "input lag"(I'd prefer calling it response time) change if you use VGA (analog) connection instead of DVI (digital)? That would be a funny workaround.
  • DerekWilson - Friday, July 17, 2009 - link

    1) scanout is always around 16ms regardless of resolution. blanking is always around 0.5ms regardless of resolution as long as the refresh rate is set to 60Hz. it's the VESA standards that determine this. Higher refresh rates mean faster transmission times. cable bandwidth limits maximum resolution+refresh. LCD makers are really the ones to blame for higher refresh rates not being available with lower resolutions ... I believe the traditional limit to this was LCD response time.

    2) i don't believe so.
  • bob4432 - Friday, July 17, 2009 - link

    so how slow is my ps/2 trackman wheel connecting into a 4 port kvm? never thought about this area of gaming...interesting.
  • DerekWilson - Friday, July 17, 2009 - link

    I'm not sure if the kvm adds significant delay or not ... that'd be an interesting question.

    I do believe that ps/2 is 100Hz (10ms) though ... so ... ya know, slower :-)
  • anantec - Thursday, July 16, 2009 - link

    i would love to see some analysis of wireless input devices, and keyboards.
  • anantec - Thursday, July 16, 2009 - link

    for example, the wireless controler for playstation 3
    and recently razer made a wireless gaming mouse
    http://www.razerzone.com/gaming-mice/razer-mamba/">http://www.razerzone.com/gaming-mice/razer-mamba/

    as the article mentioned, usb device is limited to 1000Hz, what about bluetooth devices?
  • Stas - Thursday, July 16, 2009 - link

    Really appreciate the article. Even though I didn't learn much from it. It is VERY useful to point people to when the topic comes up. "Huh, Input lag? What's that? I'm on broadband, dude, and I have a QUAD-CORE!!!" <--- With ppl like that, I, now, have more than 2 options (murder them, or spend 30 min explaining input lag), I can send them to AnAndTech. You guys, own.
  • marraco - Thursday, July 16, 2009 - link

    Thanks for such useful article.

    The tweaking on the mouse was one I never had seen before (and I search for tweaks regularly).

    One thing that I would add, is that some games (as FEAR 2) include controls for mouse smoothing, and/or some way to increase mouse responsivenes. They really affect my imput lag perception.
  • jkostans - Thursday, July 16, 2009 - link

    I use a G5 mouse, and a CRT running at 100Hz. As long as my computer pushes 100+fps I don't notice any input lag at all.
    This is what I've found to contribute to input lag in order of significance:

    Framerate, refresh rate, mouse rate. Oh and I've never used an LCD I can't stand the ghosting.

Log in

Don't have an account? Sign up now