FDrawSceneCommand->Self = GameplayThread Stall

Hi all,

I’m experiencing hitches and created a stats file to understand the issue further.
If I’ve understood the stats file correctly, the cause is FDrawSceneCommand->Self. This causes the Gameplay Thread, and other threads, to stall

What could be the cause of this?

Thanks,

.

HI AvinashSunnsay,

  • Does this occur in a clean, blank project with no additional content or is it limited to one project?
  • What steps can I take to reproduce this on my end?

Hi ,

This is limited to a specific project, and specific content. I’ve been trying to create a small repro project. However, I essentially, have to search through the content for the issue. eg. Delete something, make a build, get the ustats data and see if the issue is still present.

I’ll let you know if I have more information.

Thanks,

.

Hi ,

We have not heard from you in several days. I am marking this as answered for tracking purposes. Once you have more information available, please post back here so we can dig deeper into this error.

This can be reproduced in the VR template on 4.13 with the HTC .

To those of you trying to hunt down performance issues and are wondering why FDrawSceneCommand:Self is taking so long, here’s my hypothesis so far:

The FDrawSceneCommand in the render thread is actually calling a blocking function (probably WaitGetPose from SteamVR) which makes it seem like it’s actually doing work (since we all are looking for a WaitForWork or Sleep type event name). Thus, it’s not actually the performance bottleneck. Think of Self as a sleep call in this instance.

On non-SteamVR games, Self doesn’t block so you are left with the normal CPU Stall event. I haven’t tried with VR setups outside of the so I’m not sure if they have the same issue, but I would wager they do since the rendering pipeline should be similar.

Additionally, when using stat unit to profile the game & render threads & GPU, you’ll always see the render thread at a very similar value to GPU & frame times, even if it’s not the bottleneck, most likely because of this issue.

What I’d like to see out of the Epic devs:

  1. Make it clearer in the CPU
    profiler that this is indeed a sleep
    command, or rewrite the blocking
    mechanism to sit on a separate
    thread and have the render thread
    stall until that thread comes back

  2. Remove that extra time from the
    stats to make it more easily
    discernable to noobs like me that
    the render thread isn’t causing the
    bottleneck

Hi Cameron Abt,

  • Does this occur in a clean, blank project with no additional content or is it limited to one project?
  • What steps can I take to reproduce this on my end?
  • When specifically are you seeing this bug occur? Is this during PIE, Launch, packaged project, or just in the editor performing some other action?
  • Is this a c++ or blueprint project?
  • What was the most recent addition to the project before you started seeing this error occur?

Yes, it does occur in a blank project.

  1. Create a new project from the VR template
  2. Open the Motion Controller Map with an HTC
  3. Play the map in VR mode
  4. Use the console command “stat unit”
  5. Observe the render thread time ~= GPU time & frame time
  6. Use console command “stat startfile”
  7. Use console command “stat stopfile”
  8. Open the created UE4stats file in the session frontend
  9. In the hierarchical event view, drill down to RenderThread:FDrawSceneCommand:Self
  10. Observe the majority of render thread time spent on :self
  11. Replay the map in Play in selected viewport mode
  12. Repeat step 4
  13. Observe the render thread time != GPU time & frame time
  14. Repeat steps 6-9 using the Play in selected viewport mode
  15. Observe the majority of render thread time spent in the CPU Stall event

This happens whenever the stereo is enabled, in VR PIE mode or stand alone game.

These steps are in a blueprint project (since the template is blueprint only) but I’m sure it will happen in a C++ project as well.

Hi Cameron Abt,

I did some digging and have found that our developers are aware of performance issues with the and are working to address these concerns. These fixes will be made available in future releases.

Hi ,

Any update on this? Do you have a bug number and status of the bug?

Thanks,

.

Hello ,

I have a quick question for you that will help track down what issue it is that you are looking for. When you are experiencing the hitching described in your original post, are you seeing a gray screen or does everything just freeze?

I found that by disabling “Allow Interleaved reprojection” in the SteamVR performance settings I can get my fps up to 60 from 45 in a box map. Hopefully that helps?