Skip to main content
GameDev.net gamedev.net
🔒 Locked

Micro-stutter on single GPU system

Started by Mephs Apr 1, 2009 at 3:25 PM 1 replies 3.4k views
Original Post
Mephs
Mephs
Hey all, I've been practically bashing my head against a brick wall trying to debug a problem I'm seeing at work so wondered if anyone might have any input on the problem! Basically, what I'm seeing is that in windowed mode only (NOT a problem in fullscreen), when I get to a certain portion of the game, the game stutters. If I then log back to character select and back into the game and play again, the stutter is gone. I should point out at this point that the problem only occurs on my machine with XP and an ATI card. My other machine has Vista and an nVidia card and never seems to experience this problem. The nVidia graphics card is I think slightly more powerful, but not hugely so. If I stick some logging calls into the render code for each frame, the stutter disappears almost entirely, which seems to imply that spending a little more time on processing stops the problems from occurring in this case. I've used Microsoft PIX to analyze what is going on with Direct3D and it seems that the game is rendering several frames at an effective rate of 60 FPS, then it will render one frame at an effective rate of about 6 FPS, then it will recover again for a few more frames. CPU usage is showing as 25% on a quad core system, i.e. full utilisation of a single CPU. When I go back to character select and play again, cpu usage is showing as 7-8% rather than 25% and there is no stutter at all, though I'm loath to believe that the game really is doing anything else. I'm guessing I could be legitimately CPU bound, but I have an inkling that this might not be the case. I've read up on the issue of micro-stutters which generally occur in multi GPU systems where one frame out of several is rendered much slower than the rest, which creates a jarring visual effect despite the fact that the average FPS is really high. This sounds like the same behaviour I'm seeing, and I had read one forum post which suggested that some motherboards may have a PCIe timing issue which can lead to micro-stuttering even on single GPU systems. One of my work colleagues thinks that it may be an issue with throwing too much at the GPU and a cache becoming full and causing the stalls. Again, this sounds plausible, but I'm not sure why returning to the character select screen and back again would solve the problem. Also, the amount thrown at the GPU according to Microsoft PIX is almost identical in the case where I see the stutter to the case where I don't see it.... so again, I'm loath to believe that this is really the case. I've had a couple of ideas from browsing google, such as updating my motherboard drivers (aready done GPU drivers!) and trying to toggle the "force triple buffering" graphics setting. I'll give these a try, but if anyone else has any input based on what I've described, I'd really love to hear it as I'm almost out of ideas! Am I seeing a form of micro-stuttering or am I perhaps CPU or even GPU bound? Many thanks, Steve O *EDIT* Another possibility I have discovered is that it could be our occlusion queries. I gather that inefficient use of occlusion queries in Direct3D can produce stalls that appear to be both CPU and GPU bound. [Edited by - Mephs on April 1, 2009 4:52:32 PM]
wolf
wolf
That sounds like a driver problem. What is NVIDIA / ATI saying to this?
Mephs
Mephs
I've not got as far as speaking to them yet, but we did see a similar problem in the past in fullscreen mode as well, which I think was solved by either enabling vsync, or enabling vsync and performing a lockstepquery.

We were dealing with nVidia at the time and apparently they were quite sketchy on the issue and didn't want to be drawn into giving an answer either way until they had a chance to run the app through some diagnostic drivers (I'm not sure if this ever happened or not in the end).

The more I think about this issue though, the more inclined I am to believe that it could be some kind of query related problem. The reason for this is that my work colleague described the problem as looking like caches on the GPU were being filled, which forced the card to flush, which stalled the system.

As I understand it though, queries do exactly this if you call GetData on the query before it has completed. They stall GPU and CPU until they get the result back from the GPU. I guess that it is possible that something about going back to our character select screen might be stopping the queries from taking place, or might change something about the timings behind it all that brings everything back into sync.

Of course, I could be on a complete wild goose chase :P

Thanks,

Steve O

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.