Search Unity

Question Upgraded hardware, performance is worse...

Discussion in 'Editor & General Support' started by Innovine, Jun 29, 2022.

  1. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Can anyone help me understand where the bottleneck in performance is? I just upgraded my CPU from a i7-6000k to a Ryzen 7 5800x, and the graphics card from a gtx1070 to a rtx3080.
    In most cases, the performance is the same, or simply worse.

    Here are a few screenshots from my game running in the editor, with the game window maximized:
    stats.png
    Previously I had 80-90fps, often more.

    Screenshot 2022-06-29 170454.png

    Windows shows that my GPU isn't even at 20%. It's fans are not even running. Is this suggesting a CPU bottleneck? Read on!
    The CPU doesn't really go over 20%. I have 8 cores, how many does Unity use?

    Screenshot 2022-06-29 170554.png

    I am not an expert on the profiler, but this looks normal?

    Screenshot 2022-06-29 170622.png

    Is my game actually doing anything at all?

    To be honest, after upgrading the hardware I expected to see much higher frame rates, but its simply MEH, and sometimes worse than previous. I don't see anything here that explains why its not running way faster... do I have the handbrake on somewhere? Regular games are showing a massive improvement. It's just Unity which isnt doing anything.
     

    Attached Files:

  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,871
    CPU load is 13 ms that's pretty high. Assuming you did not write any multithreaded code your game seems CPU bound on a single thread. And single thread performance of CPUs in the past 10 years has barely increased. At the same time the single thread performance of Intel chips used-to-be better so the jump from a not-too-old Intel to a modern Ryzen may not be as huge as you'd expect - single-threading wise.

    Just to be sure it's just your game it would help to run system benchmarks, ideally some whose results you know and can compare to your old machine. I always test my old machine before upgrading to see how much of an effect I got after upgrading and whether anything seems off and needs tweaking (ie BIOS settings).
     
  3. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    But where can I see the actual load on a CPU core? 20% isn't 1/8 of 100%, which is what i'd expect... My old processor would max out on 25% which is one of the four cores running flat out. That doesnt seem to be the case here.

    Also, with numbers like this, does it indicate i can add tons of geometry and maybe reflections and lights without impacting the frame rate?
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,871
    Do you have Scene and Game view side-by-side (both visible)? If so that usually doubles the rendering load and would explain the 20%.
     
  5. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    I believe the game window was free floating and maximized, with the scene view open behind it. So yeah, might be something like that.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    In your screenshot, rendering editor alone takes 5 out of 12 ms per frame. I suggest you profile the build instead, that way the editor doesn't interfere.
     
  7. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    I have not learned how to do that yet, but i will look into it, thanks.
    Unfortunately there's something causing my build to run really slow, i suspect maybe some paths are incorrect and causing exceptions. Will reply soon :)
     
  8. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Aha, I found some issues in my build which were slowing it down.
    Without the errors, the build is running super nice!! I am very happy now.
     
    Tautvydas-Zilys likes this.