Search Unity

Bug Poor performance in brand new URP project in 2021.3.16f1 on macOS (Intel/Metal)

Discussion in 'Editor & General Support' started by nratcliff, Jan 23, 2023.

  1. nratcliff

    nratcliff

    Joined:
    Jul 5, 2014
    Posts:
    66
    I noticed really poor performance after starting a new project in 2021.3 on a 2019 MacBook Pro (Intel, AMD 5500M). I assumed it was something weird in our setup so I created a completely new project and hit play on the empty SampleScene. I'm getting very choppy framerates between ~30-50 FPS and In the profiler I see that the majority of the frame is spent waiting for the graphics card (GFX.WaitForPresentOnGfxThread). Turning on or off vsync does not seem to change performance.



    If I switch to OpenGL I see more consistent performance, and 90% of the frame is editor overhead.

    upload_2023-1-23_16-55-58.png

    For comparison: a new URP project in 2019.4 has some of the same spikiness but runs at a much higher framerate on Metal (~100 in the stats view).

    upload_2023-1-23_17-3-37.png

    What's going on here? Is there something I can do to fix this issue? It's really concerning to see such poor performance on both an empty scene and our very lightweight prototype project.
     
  2. nratcliff

    nratcliff

    Joined:
    Jul 5, 2014
    Posts:
    66
    Forgot to include: I verified that the editor is running on the dedicated AMD 5500M by looking at the GPU usage history while running the game.
     
  3. nratcliff

    nratcliff

    Joined:
    Jul 5, 2014
    Posts:
    66
    The issue seems to be resolved after updating from macOS Ventura 13.1 to 13.2. I am not really certain if the update fixed the issue though. It's possible there are 2 other things that resolved this issue:

    1. Just the computer restarting after the update

    or:

    2. Detaching and reattaching my Thunderbolt 3 dock which connects via HDMI to my external monitor and USB hub. I have audio playback issues (apps lock up, crash, or just fail to play) and mouse/kb connection problems that are always resolved with a dock unplug/plug back in, so it's not that surprising.

    Probably should have tried both of these before posting, but I figure I'll leave this note here for anyone else with a similar setup or--more inevitably--myself in the future.
     
  4. nratcliff

    nratcliff

    Joined:
    Jul 5, 2014
    Posts:
    66
    Updating this because the issue occurred again. Still not sure what's causing it but restarting the MacBook resolved it. Detaching and reattaching the dock did not change anything.