Micro stutters - how to diagnose?

Hi guys!

I’m encountering a problem when running vvvv: Every 3-500ms or so, vvvv stutters a bit. This occurs even (and can be nicely observed) with a super simple patch of just a quad translating left to right - the expected motion is supposed to be smooth, but it is not, there’s a little jerk one or two times a second, not totally regular.

I have a hard time diagnosing it. It occurs irrespective of single or dual screen, if multiple renderers show the same content (initially I suspected some weird sync issue with external monitor).
Renderer presentation interval does not have an influence, Main loop time mode Filtered or Increment show the problem in a more pronounced way.
I also fiddled with graphics driver settings, does not seem to do anything.
I don’t know if there are background processes running causing this, but I have nothing out of the ordinary running I think. Virus scanner is deactived, doesn’t help.

This problem was present in earlier versions of vvvv, too, but I haven’t been using it so heavily lately, and coming back to it it seems to be more pronounced (can’t swear this, though).
Ah yes, I’m using b27.2, on a Win7 64bit laptopt with an Nvidia Quadro FX770M chip, driver version 296.83.

So, does anyone have an idea what this could be, or better how to fix it? It’s pretty annoying if you present slowly moving graphics. :-(

hei buchi,
thanks for your description, but the demopatch is missing.

ah sorry. demopatch was literally just an LFO->linearspread->transform3D->quad->renderer, translating 2 quads. But you’re right, I should have attached one. Will do so in the evening when I get to my Windows PC.

does that help? if you disable “Threaded Optimization” in the graphics card control panel

joreg: find demopatch attached.

liquid: It seems this has helped, thank you very much! what an anti-feature.
The stutters are much less frequent now (every 2 seconds). It’s harder to see them now in the demopatch, a bit more visible in my performance patch, I’ll see if this is some other patch in there which causes this.

Any more tips on debugging this? Is there something I can plot which would show these stutters? Frametime or so? I patched an fps graph, but they are not really visible there (not even before). Staring at moving rectangles is not very scientific. :-P

Any tips regarding graphics settings? Vsync? triple buffering? Everything except Threaded Optimization is at defaults and/or “let application decide”, and I got to admit that I don’t have much experience with the insides of the nvidia control panel, I can only blindly flip switches and reboot. :-/

stutter-demopatch.v4p (2.5 kB)

be sure to also test your box with dpc latency checker. sometimes these lags come from the strangest sources… (like e.g. internal optical drives of some thinkpads)

do you also see these stutters in the perfmeter graph? if not, it might be be a sync interference of some calculation loops with the mainloop, or just your mind playing tricks on you…

Good points. See screenshot.
latency seems to be OK overall. The 1300us max in the screenshot were a fluke, normally it stays below ~750us.
Stutter every ~2s is visible in the perfmeter, though only in the dot graph, not in the bars. “GPU” also stays displayed throughout.

sometimes it just is bad again, I have not yet found out when that happens. Then the stutter is back again at ~300ms interval (see image)

Something interesting happened though. When I started the latency checker when the stutter was bad, the stutter went back to slight ones every 2s again! I could not repro a situation where the stutter was bad and the latency checker running at the same time. Could this be some weird sleep issue of cpu and/or hdd?

I think I stopped understanding now… using the default Win7 High Performance power plan settings, performance actually gets worse, unless I let the latency checker run alongside! If I do that, the results are probably as good as they’ll get - a little barely noticable stutter now and then (>3s on average).

Have you tried Increase Timing Precision on MainLoop (VVVV)?

huh, nice. this has the same effect as letting the latency checker run. that’s some serious vvvvoodoo. What does it do? What does the “present upfront” do?

I guess this is all I can get, it runs pretty smooth now except for a small stutter every couple seconds. Thank you vvvv community, you’re the best! :-)

concerning Increase Timing Precision: this is indeed a bit weird as it is calling a windows api timeBeginPeriod that has a global effect: “This function affects a global Windows setting. Windows uses the lowest value (that is, highest resolution) requested by any process.”

and your latency checker obviously does the same…

your screenshots show you’re doing those tests in windowed mode. do you have the same effects in fullscreen mode? i’d not trust windowed mode…

Maybe SpeedStep is to blame. You could use CPU-Z to verify if something happens to core-speed and/or voltage when enabling/disabling Increase Timing Precision (or starting the latency checker).

this glitch i think on all dx apps

some browser glitch ate my lengthy post, so pls excuse the brevity.
fullscreen doesn’t seem to make a difference. cpuz didn’t show a connection between increased timing precision and CPU/GPU speed.
thanks for the help/hints in any case, it’s much better than before!

just spent 8 hours on the exact same issue. in the end switching the graphics card solved the issue. the glitches appeared on a palit geforce gtx 680 and disappeared on a gtx 560 i think it was. we tried pretty much the same stuff you describe here, nothing helped except switching the hardware :/

thank you (I’m not alone, yay!). It’s good to have clarification.
I’m sad though, cause the glitch is on my laptop, so switching out the GPU is out of the question for me. :-(

@elias, can you provide a patch ?

lol no :)… no text …