Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How would you explain this strange performance behaviour?

Discussion in 'Windows' started by Marou1, Aug 23, 2023.

  1. Marou1

    Marou1

    Joined:
    Dec 13, 2021
    Posts:
    161
    Hi,

    I made a build (standalone) of the game I am developing. It was running smoothly, but recently it starts stuttering randomly.
    Usually, I would check if it's the CPU or the GPU that is the bottleneck and start investigating from there...
    However, in this case none of the CPU or the GPU is the bottleneck. It is actually quite the opposite!

    The usage of the CPU and that of the GPU both drop simultaneously and significantly, then the game starts stuttering.

    upload_2023-8-22_19-37-1.png

    I have no idea how to explain this.
    It looks like something restrains the CPU and the GPU activity.

    Possibility 1: It is not related to the build, but to some other software on my computer or the hardware. But then, why I've never encountered this behaviour when playing other video games? If I am playing a video game and it is stuttering, it's always because the CPU, the GPU or the memory is shocking.

    Possibility 2: it is related to the build, but then I have no idea how to explain that.

    Thanks
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,628
    CPU doesn't go completely idle and all it takes is 1 thread take longer than expected and it will have a hit in performance. Did you try looking at the profiler to see what's going on during the stutters?
     
  3. Marou1

    Marou1

    Joined:
    Dec 13, 2021
    Posts:
    161
    My CPU has 8 threads, and they all slow down, and the GPU too with the same pattern.
    At least one of them should have a high usage when the game stutters?

    upload_2023-8-23_10-7-3.png

    With the profiler, I see the culprit and I will have to find a workaround. But still, I don't understand the graphs.
     

    Attached Files: