Stutter / Micro Stutter Even w/ VSync

Started by
34 comments, last by DvDmanDT 10 years, 4 months ago

Some quick questions..

For how long does a frame stay when it stutters? Are we talking 2-3 frames or more?

Can you give some more detailed specs on your test systems?

Windows (and most likely Linux) parks unused CPUs and unparks them when needed. This is supposed to be transparent, but it's not. Maybe other games just use more cpu and therefore keep them unparked while you end up just on the line causing it to toggle them all the time?

What energy setting are you using? In Windows, make sure you are using High Performance or vendor-specific equivalent.

Advertisement

Hello, and thanks for participating!

I would say 2-3 frames, if I had to guess. You should be able to replicate it via the sample program I posted on github

https://github.com/martinisshaken/Sample-SDL2-OpenGL-Program

As for system specs, this is the info for my laptop:

/proc/cpuinfo:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz
stepping : 7
microcode : 0x1a
cpu MHz : 2093.189
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
/proc/meminfo:
MemTotal: 6099052 kB
MemFree: 3653744 kB
Buffers: 119444 kB
Cached: 1361440 kB
NOTE: I run ubuntu 32-bit, even though I've 6gigs of ram, hence the mem free being so low. All I have open when running this is 14 chrome tabs.
lspci:
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)

Regarding the parked CPU, would this still be an issue if I don't limit frames and just let it run full boar at 700fps? Because the same stuttering issue occurs with or without Vsync enabled.

As for energy settings in Linux I have tried using cpu management tools to set the power to performance or else maxing out the CPU. Same for windows with high performance setting.

I have also tried setting task priority to very high in Linux and real time in Windows to no avail. Exact same stuttering in the exact same way.

Hmm, on Linux, have you ever tried LTTng? It basically creates a recording of your system activity which you can then view using tools like LTTv or an Eclipse plugin. Using that, you might be able to get a better understanding of what actually happens. You can see stuff like interrupts, syscalls and more. Maybe some high-prio process/task comes in, maybe there is some other driver doing something funky, etc.

I personally don't have a non-virtual Linux system which I can run it on and I also don't have stuff setup for SDL and or OpenGL on my development machines, so I can't really try to reproduce it at the moment.

About CPU parking, I don't really know honestly. All I know is that it has been known to cause hickups in games etc, so I disabled it early on and haven't looked back since. LTTng _might_ show you if cpu parking is related.


All I have open when running this is 14 chrome tabs.

And you still wonder about a little stuttering? Probably the browser/some flash thingy needs a little CPU shortly.

Hmm, on Linux, have you ever tried LTTng? It basically creates a recording of your system activity which you can then view using tools like LTTv or an Eclipse plugin. Using that, you might be able to get a better understanding of what actually happens. You can see stuff like interrupts, syscalls and more. Maybe some high-prio process/task comes in, maybe there is some other driver doing something funky, etc.

I personally don't have a non-virtual Linux system which I can run it on and I also don't have stuff setup for SDL and or OpenGL on my development machines, so I can't really try to reproduce it at the moment.

About CPU parking, I don't really know honestly. All I know is that it has been known to cause hickups in games etc, so I disabled it early on and haven't looked back since. LTTng _might_ show you if cpu parking is related.

Just tried out LTTng and it dumped 60MB of data (which babeltrace spits out to my stdout) for only 10 second of gameplay. Wow. May install Eclipse to try and interpret the trace data. Tried plugging it all into an IDE when I set it up with visual studio, but trace data there didn't seem to help. The most valuable trace information so far is what I've posted in some other posts where I've screens that show how long each frame takes using c++11 chrono. I can't imagine system calls and other processes really interfering with the code, given that it happens the same way across multiple systems at the same times. I tried recording it to post a video, but it seems my computer can't handle that. Will try fraps or something in Windows and see if I can record with that.

LTTng can indeed create alot of data if there's alot of things going on. :) You will most likely want to use some visualizer in order to make sense of it. The Eclipse plugin can apparently also be run standalone. Tracing is one of the best ways to debug these sorts of issues since you get history and in this case also a wider perspective (full OS).

This topic is closed to new replies.

Advertisement