Stat Unit: Frame time larger than game, draw and GPU...why?

As the title says,

Frame: 18ms
Game: 11ms
Draw: 15ms
GPU: 15ms

I thought Frame was supposed to reflect the highest of the other three. What does it mean when Frame is higher than the other three?

I notice that the higher the Draw goes, the higher that padding goes Frame. My framerate target being 60fps, 15ms is pretty close. With a draw of 16ms, Frame moves up to 19-20ms.

I had a theory that ā€œFrameā€ meant the results of the Render thread but the numbers donā€™t seem to match either when I look into it using ā€œstat startfile/stat stopfileā€. Itā€™s possible the stat commands add a bit to the render thread throwing it off and that extra amount is not recorded.

Definitely not the render thread. I got an instance of Frame being 24ms but the render thread was at 18ms. Thatā€™s a pretty big gap. Not sure whatā€™s the holdup when the Game, Draw, and GPU are all under the Frame time by several milliseconds.

Just a wild guess: You are probably running in the editor, and Slate is probably having fun with your timings.

with ā€œprofilegpuā€ you should see an estimate on how long the SlateUI itself took, and i think its not counted into Draw/GPU time.
Try starting your game as standalone without the editor open and see what timings are then.

Not running it in editor, but Iā€™ll look into how much Slate takes. I thought it was a CPU issue so I didnā€™t look at profilegpu. Iā€™ll try that next, thanks.

I donā€™t think itā€™s Slate. With only ā€˜stat unitā€™, slate on the GPU is small (0.1ms) and on the CPU itā€™s about 0.6ms. With something like ā€˜stat scenerenderingā€™ slate can go up 10ms, but thatā€™s not what Iā€™m doing. Doesnā€™t look like Slate alone accounts for the 3ms Iā€™m losing somehow. This is one of those Heisenbugs where observing it changes its behavior. ā€˜stat startfileā€™, ā€˜stat unitā€™, etc will affect the very values that they are trying to calculate.

I saw another case where Frame was 5ms higher than any other value. If someone knew if the number is just artificially high and related to having ā€˜stat unitā€™ on, thatā€™d be great.

Itā€™s possible ā€˜Frameā€™ reflects ā€˜stat SceneRenderingā€™ but itā€™s hard to say because turning on SceneRendering makes the Frame shoot up > 10ms. If someone could confirm what ā€˜Frameā€™ reflects, that would be great.

I might report this as a documentation bug. Why add stats like ā€˜Frameā€™ and ā€˜Drawā€™ and not explain what they mean? Draw moves up and down depending on occlusion, transparency layers, how many meshes are rendered, how many dynamic shadows are being generated, and other miscellaneous factors. It would be good to know exactly what is included in it. ā€˜Frameā€™ is completely unexplained. The only pseudo-explanation I can find is in this document: How to improve game thread CPU performance in Unreal Engine - Unreal Engine

This was a hardware specific issue related to VR. If youā€™re near the framerate threshold of 60fps you might miss the window for rendering the new frame and instead the system will reproject the old data. This reprojection can add several ms to the process, depending on how badly you are missing frame. The fact the other stats displayed under 60fps but still getting this reprojection penalty was a symptom of spikes in fps that average out in the display.

1 Like