The microprofiler on the server shows a label called “Thread” with no active labels underneath taking a long and inconsistent amount of frametime ranging anywhere from 5ms to 23ms every frame. There is no context of it’s purpose and no hints regarding on why it’s suddenly a large performance hit.
This has only appeared recently without changes meanwhile previously we’ve been able to stably keep well under the 16ms frametime budget.
Generally when that “Thread” marker shows up like that it means there is a thread that’s ready to do something but there’s nothing to do. However I am interested in the image that you posted because I can’t tell why one Thread took 17ms. Could you please post a dump HTML?
Thanks for the dump. I can confirm that the “Thread” marker represents time when we’re not doing any work. The inconsistent frame times are being investigated because ideally they would stay very close to 16.667ms
Just to add to this, I’m noticing it in my game which very rarely has any extra frame time (I’m a really bad programmer) and I’m even seeing this in a blank baseplate taking upwards of 30ms sometimes.
I count the time between frames on my game and these threads typically take minimum of 3ms, and I’ve seen upwards of 140ms (although I honestly think that’s a bug)
I scale the amount of time I have for the PostSimulation step based on how much time I suspect I have in the frame to maintain ~60FPS. Whatever is happening here could really cause some runaway performance issues.
It seems really odd that this step happens before the game loop runs, since it doesn’t seem possible for it to predict how much time the actual step is going to take. Am I crazy? Unless the profile is incorrect, it doesn’t play this Thread job until the very beginning of the frame, which seems impossible as a “gap fill.” Here’s two separate frames showing what I’m talking about:
What’s happening in the attached image and MP dump is that the server has very little work to do and is sleeping most of the time. The “Thread” markers correspond in these cases to sleeping because we don’t go faster than 60 frames per second.