Performance issue

I have have an performance issue that i cant really track down.

So i’m just hoping maybe some of you have seen, had , heard of similar issue.

So i run my app without wideo sync and it 150-200 fps but it lags, or spikes or like jerks as if i would have below 24 fps.

With video sync enabled at 60 fps it jerks a lot less.

From pstats i can see some wait spikes, but im not sure if these cause it.

No sync pstats shot:
img100.imageshack.us/img100/995/pstats.jpg

Sync shot:
img294.imageshack.us/img294/2310/pstats60.jpg

Any crazy ideas are welcome.

If you open up wait, are the spikes “thread block”?
You can try the following PRC setting:
pstats-max-rate 30

Yup just found out that they are thread block spikes
and that line did make them smaller.

loadPrcFileData(’’, ‘pstats-max-rate 60’)
Made them disappear completely.

Yet if i dont use pstats the small jerking becomes visible(both with sync and without sync). It has an interval of roughly 1 sec and it does not show itself while pstats is running.

That’s one of the reasons we have video sync enabled by default. Without video sync enabled, you are at the mercy of your graphics driver for the disposition of each frame, which might be very jerky indeed.

David

In my case the small jerking is also visible with video sync enabled.
With video sync disabled it’s just more clearly visible.

But in both cases if i have Pstats running the jerking disappears.

And the jerking has an interval of 1 sec jerking 1 sec smooth. And i dont have any tasks, loops that have such intervals, most stuff runs every frame or every 0.1 secs.

Any ideas David what has the chance to cause something like that, can animated models make something like that? as these are the only things that have a roughly similar loop length.

Nothing in Panda has an interval of roughly one second. I suspect this is something in your graphics driver. Do you see the same behavior if you run tinydisplay?

David

If i ran tinydisplay or dx8 the performance was very bad and the client did very many strange things and was unable to connect to my server correctly.
dx9 did a little better yet the connection still was not stable.

In short tiny,dx8,dx9 increased the number of flaws, errors, strange behaviors, i really was not able to tell wether the small jerking was there or not.

But i discovered some other thing.
I played around with 3 things:

  1. Client sync enabled/disabled
  2. Server sync enabled/disabled
    3.Pstats running/not running(pstats-max-rate 60)

Note: server is running on a separate core, yet same machine.

The result were:
If Psatas was running the client ran smoothly and only if=pstats-max-rate 60.
If Pstats was not running and the server had vsync enabled the client ran smoothly.
All other cases did not run smoothly.

I also checked my server with pstats, and it runs super solid 1800 fps with no spikes in graph.

The jerking is actually rather small, and tried to pinpoint it by ripping stuff out of my application step by step but as the client got easier to run the jerking went smaller and smaller and i really did not find any particular place that causes it.

I ended up with a single bush on the screen and moving around it at 1500 fps and it ran smoothly.

I actually hoped that maybe someone has had a similar problem, cause investing more time into it does not seem wise for the moment, neither would i want anyone else to seek it as it it not a critical performance issue(thats why no source included), but its the only one i have.

So i hope in time it will show it self more clearly, if i find anything that seems important of informative ill post it. Also if im able to isolate it into a smaller standalone app ill post the source as well.

Thank you teedee for the Pstats tip and thank you David for your tips and info.

Is the server running on a separate machine from the client? Maybe the problem is that the server is sending more data than the client can handle and some of it is not being received.
If the problem is actually a frame rate jerk then it should show up in pstats, so I find that a bit strange.