On TechReport's frame latency measurement and why gamers should care

Discussion in '3D Hardware, Software & Output Devices' started by Andrew Lauritzen, Jan 1, 2013.

  1. ECH

    ECH
    Regular

    Joined:
    May 24, 2007
    Messages:
    682
    Likes Received:
    7
    Let me give one example of what I mean by more info/testing. Read this review regarding Skyrim stuttering.
    http://benchmark3d.com/microstutter-case-study-skyrim-wtf-edition

    The end result is that the stuttering in that game was found to be an issue with how the game uses the cpu's cores. There are other fixes such as using window mode, etc but the most profound difference would have been to limit the cpu affinity.

    The funny thing about this is that it's not an uncommon thing for users to offer that as help in reducing stuttering. Be it that it fixes the problem or not. A quick google search does reveal discussion about limiting cpu cores to fix smoothness issues.
    :smile:
     
  2. almighty

    Banned

    Joined:
    Dec 17, 2006
    Messages:
    2,469
    Likes Received:
    5
    It would appear that it's the games code and not the GPU drivers...

    Is there a way to fix this via a driver update though?
     
  3. Andrew Lauritzen

    Moderator Veteran

    Joined:
    May 21, 2004
    Messages:
    2,526
    Likes Received:
    454
    Location:
    British Columbia, Canada
    If it's in game code, no it can't be fixed by drivers. And definitely that's the place to check first - it's only interesting to start looking at drivers when it's clear that stuttering is occurring on one card/driver and not another.
     
  4. 3dilettante

    Legend Alpha

    Joined:
    Sep 15, 2003
    Messages:
    8,122
    Likes Received:
    2,873
    Location:
    Well within 3d
    The experimental fix was to force thread affinity for the process, which involves system elements not part of the game's code.
    I'm curious if this is sufficient to isolate the application as the culprit.
    Is it advisable for games to try forcing affinity on their own?
     
  5. ECH

    ECH
    Regular

    Joined:
    May 24, 2007
    Messages:
    682
    Likes Received:
    7
    Is there any visual anomalies while standing there doing nothing? Or is it only seen while in motion (user input)? That could eliminate a lot of 'what ifs'.

    It would also be good to see the thread priority of the game and if it's being boosted. Example:
    http://technet.microsoft.com/en-us/library/cc938611.aspx
     
  6. XTF

    XTF
    Newcomer

    Joined:
    Jan 3, 2013
    Messages:
    27
    Likes Received:
    0
    [​IMG]

    What's happening here? Frametimes seem to be all over the place.
     
  7. Andrew Lauritzen

    Moderator Veteran

    Joined:
    May 21, 2004
    Messages:
    2,526
    Likes Received:
    454
    Location:
    British Columbia, Canada
    It is not in general enough, no, since the driver is largely in user mode these days and is free to (and does) use the threads that it is called on. Most drivers also create a separate thread to try and do some of the heavy lifting without blocking the application's threads too much as well, but definitely work is done on the rendering threads as well.

    Forcing affinities is usually not wise. You can run into bad situations like clashing with the aforementioned driver threads - which are also usually pinned for some reason - and halving your performance (or more). It's a potentially useful debugging tool to figure out what's going on, although GPUView/ETW is better. I'd definitely not recommend shipping a game with pinned threads as driver implementations change over time...

    It's hard to notice frame time anomalies with no motion on the screen though, since really that motion smoothness is what is compromised by spikes. The easiest way to see spikes is actually to shake the mouse back and forth (in a game where the mouse controls the camera/view) as it's fairly easy for our brain to follow motions that we're making ourselves, and thus and stutters are pretty jarring. This is also a pretty good stress test for input latency... even a fairly small amount of latency is quite obvious under such a test.
     
  8. caveman-jim

    Regular

    Joined:
    Sep 19, 2005
    Messages:
    305
    Likes Received:
    0
    Location:
    Austin, TX
    I can't see how given that TR showed the NV card not suffering from the same problem.

    Perhaps a good data point would 'what happens when you set affinity for the GPU driver to 2 cores' with and without allowing the game engine to overlap.
     
  9. Andrew Lauritzen

    Moderator Veteran

    Joined:
    May 21, 2004
    Messages:
    2,526
    Likes Received:
    454
    Location:
    British Columbia, Canada
    Right, seeing it on one IHV and not another is kind of a smoking gun... No one is claiming that all stuttering is due to drivers - in fact I'd say more is due to game code in general - but sometimes it clearly is.

    As I mentioned above, that's not entirely possible. A lot of the driver runs in user mode these days on the same thread(s) as the application.
     
  10. ECH

    ECH
    Regular

    Joined:
    May 24, 2007
    Messages:
    682
    Likes Received:
    7
    I should have been more clear. I wasn't referring to the visual effects but what the graph shows. Does the graph show the exact same valleys and peaks standing still vs while in motion? That would eliminate a lot of 'what if's'. Another thing, how much of a role do visual anomalies play in a standard 5400/7200 rpm HD play vs top end SSD in a game? Be it stream based or otherwise. Is it possible to always assume that large spikes on the graph represent i/o processing or some sort of i/o delay as the system access's the HD? This would start the process of identifying/categorizing the results of a given chart. Again, more testing/information...

    Another thing, in BF3 I noticed something called 'scope jerkiness' that seems to happen when using certain scopes. Basically when strafing left to right the movement is jerky. Here is one of the old threads about it:
    http://battlelog.battlefield.com/bf3/forum/threadview/2832654347808964390/
    Also a video showing exactly how jerky the movement can be. Keep in mind this is another visual anomaly.
    http://www.youtube.com/watch?v=Ydtw0DORlcA&feature=youtu.be

    I was able to fix this issue by unplugging my usb keyboard, waited a second then replugged it while in game (as it was a keyboard related issue not a mouse). And the jerkiness went away. So it's important, at least to me, that whenever a visual anomaly is found it is identified to whether it relates to an input device or not. I'm not saying that unplugging the input device will always solve the problem. It just cuts down on what one needs to look at in order to find some sort of solution. Be it temp. or otherwise.
     
    #110 ECH, Jan 15, 2013
    Last edited by a moderator: Jan 15, 2013
  11. Kaotik

    Kaotik Drunk Member
    Legend

    Joined:
    Apr 16, 2003
    Messages:
    8,184
    Likes Received:
    1,841
    Location:
    Finland
  12. silent_guy

    Veteran Subscriber

    Joined:
    Mar 7, 2006
    Messages:
    3,754
    Likes Received:
    1,379
    Great to see how a few people who want to do things a little better can move the scale this much.
     
  13. ECH

    ECH
    Regular

    Joined:
    May 24, 2007
    Messages:
    682
    Likes Received:
    7
    They used a different 7950 indicating a problem with the other 7950 using 13.2 cat drivers.
     
  14. Albuquerque

    Albuquerque Red-headed step child
    Veteran

    Joined:
    Jun 17, 2004
    Messages:
    3,845
    Likes Received:
    329
    Location:
    35.1415,-90.056
    Ah, I quoted you right when you edited. Sneaky, sneaky ;)
     
    #114 Albuquerque, Jan 17, 2013
    Last edited by a moderator: Jan 17, 2013
  15. ECH

    ECH
    Regular

    Joined:
    May 24, 2007
    Messages:
    682
    Likes Received:
    7
    What is this edit you speak of? :wink:
    It would appear that we are still back to square one though. There is no legend to go with the graphs that define what's being reported. What does a graph look like when a game stutters, hitches, warping, jerky, etc? When is the game smooth? For example, it's pretty common to see large spikes indicating some sort of i/o process or HD access.

    We see that the inner workings of the game is running as it should but again I don't see how it relates visually.
     
  16. Albuquerque

    Albuquerque Red-headed step child
    Veteran

    Joined:
    Jun 17, 2004
    Messages:
    3,845
    Likes Received:
    329
    Location:
    35.1415,-90.056
    You're correct in that there isn't' a legend for those linegraphs, rather there's a whole narrative on how to read them. If the line graph isn't a "line" but instead a smear, then there are significant and continuous frame rate variations. The thicker the "smear", the more inconsistent the framerate.

    Individual, single-frame spikes do show up on those graphs exactly as you might expect (and can easily see). The concern is when there is no distinguishable line for all the other frametimes, but instead a "swath" that spans many milliseconds. That is directly telling us that there is no temporal continuity to how frames are being presented, which results in gameplay that can only be best described as "not smooth".

    There are videos posted of the effect, and longer versions of the narrative that can better explain. I'm not sure what else can be said or shown to describe and demonstrate the effect...
     
  17. Andrew Lauritzen

    Moderator Veteran

    Joined:
    May 21, 2004
    Messages:
    2,526
    Likes Received:
    454
    Location:
    British Columbia, Canada
    The percentile graph is the one to look at. Lower line = faster. Flatter (all the way as close to 100 as possible) = smoother.
     
  18. Davros

    Legend

    Joined:
    Jun 7, 2004
    Messages:
    14,893
    Likes Received:
    2,311
    Good to see amd are on the case maybe we should have a be nice to dave week.
    (and this is from someone who once started a post with the line "Bring me the head of Dave Bauman" )

    ps: It would be really interesting to know why the driver doesnt work on one ihv's card
     
  19. swaaye

    swaaye Entirely Suboptimal
    Legend

    Joined:
    Mar 15, 2003
    Messages:
    8,457
    Likes Received:
    580
    Location:
    WI, USA
    I've seen this issue before. The ASUS G73JH notebook was shipped with some M5870 boards that would only run a single driver version reliably. It would die with full screen corruption very quickly when doing 3D. Eventually a new video BIOS was released that fixed this. I think I read that these boards were a different design in some way.
     
  20. XTF

    XTF
    Newcomer

    Joined:
    Jan 3, 2013
    Messages:
    27
    Likes Received:
    0
    That's not true in general. If A works fine with B but not fine with C you really can't tell whether it's A or C or both that are 'at fault'. Most things are too complex for simple 'logic' to work.

    It could be game code that's sub optimal. Maybe nV found a way to work around that by having the game think the frame time was relatively constant even if it wasn't.
    Maybe DX / Windows is sub optimal too. :p
    You really have to look at the system as a whole.
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...