Announcement

Collapse
No announcement yet.

Is it normal that the game thread never takes longer than the GPU thread?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is it normal that the game thread never takes longer than the GPU thread?

    Hello,

    I mean that when using "stat unit" that the ms of the game thread are always lower or the same like the ms of the GPU thread. So it can't be for example 50 ms in the game thread and 20 ms in the GPU thread, right? But it can be game thread 20 ms, GPU thread 20 ms or game thread 10 ms, GPU thread 20 ms. Game Thread <= GPU thread?
    So I am CPU bound if both, game thread and GPU thread take identical time, right? In my game both are always the same.

    Thanks.

    #2
    You can't expect the game thread to be slower than GPU thread if you don't have a ton of AI or game logic going around right?

    Comment


      #3
      Originally posted by Indorile View Post
      You can't expect the game thread to be slower than GPU thread if you don't have a ton of AI or game logic going around right?
      I tested it. I made an empty map and a blueprint with a for loop in the tick-event which calculates sin(DeltaTime) 1000 times (per tick). Then placed a few of it in the map. sin() runs clearly in the game thread, thus I would expect the game thread to be very slow and the GPU thread to be very fast, because it's an empty map with no graphical elements. But they were the same, both were at around 100 ms, identical.

      Comment


        #4
        Is it normal that the game thread never takes longer than the GPU thread?
        Hi, yes that is normal. Your GPU time is synced with the frame time, so when it has finished rendering it will stall till the next frame. To get a better measurement of how much time the GPU actually uses, use "stat gpu".

        So if the GPU time is nearly the same as the frame time then it is most likely that the GPU is not the bottleneck. To make sure of that, you can just set your resolution (r.ScreenPercentage) to something very low and if the frame time does not change, then you're not bound by the GPU.

        Comment


          #5
          I am seeing similar results in 4.25.

          GPU thread is never less than game thread, no matter what the game thread time is.

          If they are equal, you can probably assume you are cpu bound.

          Or event better - using r.ScreenPercentage as chrudimer suggested is a great idea
          Last edited by OptimisticMonkey; 07-20-2020, 02:42 PM.
          https://www.casualdistractiongames.com

          Comment

          Working...
          X