Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

2020.2.0b1 Performance Reduction

Discussion in '2020.2 Beta' started by DrabanL, Sep 6, 2020.

  1. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    But we can start to try to isolate what causes this and why reproducing it might've failed (post excluding stats view FPS changes, yep the change was confusing internally too)

    @DrabanL What kind of GPU and CPU are you using?
    Do either of you (i.e. also @Creepgin ) have any overclocking, vSync affecting or otherwise graphics driver/ gaming overlay/ hardware tool running?

    Also I'm assuming based on what I can see that this is on windows 10. Are you both using URP sample projects created with the Unity Versions you are testing on or are any upgraded through the versions? Are they using the same Graphics API and general settings?

    And which URP Versions are you using in each Unity version and does the regression change if you update it to the highest available version in each?
     
    Last edited: Dec 30, 2020
  2. Creepgin

    Creepgin

    Joined:
    Dec 14, 2010
    Posts:
    413
    My machine: Intel Core i7-7700K @ 4.20GHz; NVIDIA GeForce GTX 1080; Windows 10 Home 10.0.19041 Build 19041

    So all my setups are very straightforward. No overclocking done. No gaming overlays or weird vSync settings. The test projects I used were newly created straight from Unity Hub with the URP template. No default settings were changed whatsoever.

    The URP versions were also the default versions that came with the Unity versions (no packages were removed or upgraded after creating the projects). So the URP versions were 8.3.1, 10.2.2, and 11.0.0 (for Unity 2020.1, 2020.2, and 2021.1 respectively).

    Also per your suggestion, I tried upgrading URP 8.3.1 in Unity 2020.1 to 10.2.2 and 11.0.0, but both attempts led to tons of console errors. And I tried reimporting and deleting Library folders to no avail.
     
    MartinTilo likes this.
  3. samsv

    samsv

    Joined:
    Jan 1, 2021
    Posts:
    1
    Wanted to drop by and note that I'm on Mac OS and using the built in renderer and I've noticed significant drops in performance too, moving from 2020.1 to 2020.2.
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    @samsv Performance drops not identifyed by the fps counter in the stats view but by a Time.deltaTime based fps counter/fraps or better still he profiler? Is this for upgraded projects or newly created default URP projects too? Which URP versions?
     
  5. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    sorry saw the note on built-in RP too late, please start a new thread and/or bug report on this if you've double checked that it isn't just the stats view FPS calculation change we discussed in this thread. This issue here has been plagued by ambiguity and confusions enough to stall it so far and I'd like to keep these separated until proven that they share the same root cause. And the profile Analyzer data shown here so far hint at an issue in URP and rendering performance.
     
    Last edited: Jan 1, 2021
  6. DrabanL

    DrabanL

    Joined:
    Nov 13, 2014
    Posts:
    31
    @MartinTilo

    GPU: R9 390
    CPU: i5 3470

    No overclocking, vsync or others. all defaults.
    Both projects created with unity hub separately (no upgrades) and with the latest verified packages of URP (
    11.0.0 and 8.3.1).
    The graphics API and other settings is the same which is set with the sample project of URP.
    .
     
    MartinTilo likes this.
  7. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    Actually, I guess the Empty scene isn't really using URP but built-in?

    Anyways, between post holiday catch-ups I've done some initial cursory attempts at reproducing this and so far failed with my uGUI, Recorder and deltaTime based ms and FPS display to see anything but a very mild performance improvement from 20.1 to 20.2, unless I toggle on the stats view which has more elements to render in 20.2 and adds an about 0.3ms regression. Have you tried this with just the Fraps/own fps display and without the stats view open
     
  8. Creepgin

    Creepgin

    Joined:
    Dec 14, 2010
    Posts:
    413
    For built-in RP, I have about the same FPS (~460) with empty scenes in 2020.1 and 2020.2. So to me, this whole regression is URP-only.

    @MartinTilo That's interesting. What about the Profiler? Do you see a noticeable perf drop in 2020.2's PlayerLoop compared to 2020.1's?
     
  9. DrabanL

    DrabanL

    Joined:
    Nov 13, 2014
    Posts:
    31
    @MartinTilo

    Hiding the stats view does increase the performance in some small margin, but 2020.1 (420 fraps) is still far better than 2021.1 (300 fraps)

    (URP empty scene)
     
  10. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    Alright. I've gone over this a couple of times now. I can't reproduce a performance regression in Empty Scenes. I can reproduce on in the Sample Scene.

    Note: We have somewhat different machines. And I think this is down to newer versions taking more CPU time for rendering but way less GPU time, which could explain why its so tricky to reproduce the regression, because the overall frame time doesn't change much for me, but depending on what hardware you have, you might be better or worse off with this shift.

    For reference:
    My machine
    Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz 2.40 GHz (up to 5GHz)
    GeForce RTX 2080 with Max-Q Design

    I am using my performance testing Windows Custom Power Plan with 99% settings on the Processor Power Management to avoid CPU scaling to kick in (effectively locking my CPU in at 2.28GHz)
    rundll32_cTZT4zQ65m.png

    I've used the attached scripts and canvas to help in the process. For the measurements I've disabled the canvas and just used the 5s measurements triggered with Shift+F10 (to average FPS up over 5s) and Shift+F12 (to generate Editor Profiler data for 5s without the Profiler Window open) to keep things as comparable as possible. I've checked debug and release editors. I've made sure that GI was done before measuring and the fps stabilized. There is a difference between creating a new Empty Scene, and taking the existing Sample Scene and deleting out everything but the camera and light, at the very least the skybox is different, so I checked that emptied URP scene against a newly created one, though there is hardly a difference in the highlevel metrics (collected with the Shift+F10 so not profiling data, just accumulated Time.deltaTime):

    2020.1

    Empty Scene
    Debug
    Frames: 627 - Average Frame Time 7.98ms - Average FPS 125.3
    Release Frames: 631 - Average Frame Time 7.93ms - Average FPS 126.1

    Empty Scene URP
    Debug
    Frames: 627 - Average Frame Time 7.98ms - Average FPS 125.3
    Release Frames: 642 - Average Frame Time 7.79ms - Average FPS 128.3

    Sample Scene URP
    Debug
    Frames: 600 - Average Frame Time 8.35ms - Average FPS 119.8
    Release Frames: 620 - Average Frame Time 8.07ms - Average FPS 123.9
    (alternate Release run) Frames: 627 - Average Frame Time 7.99ms - Average FPS 125.2

    2020.2

    Empty Scene
    Debug
    Frames: 633 - Average Frame Time 7.90ms - Average FPS 126.5
    Release Frames: 644 - Average Frame Time 7.76ms - Average FPS 128.8

    Empty Scene URP
    Debug
    Frames: 631 - Average Frame Time 7.93ms - Average FPS 126.1
    Release Frames: 643 - Average Frame Time 7.78ms - Average FPS 128.6

    Sample Scene URP
    Debug
    Frames: 599 - Average Frame Time 8.35ms - Average FPS 119.7
    Release Frames: 610 - Average Frame Time 8.21ms - Average FPS 121.8
    (alternate Release run) Frames: 603 - Average Frame Time 8.30ms - Average FPS 120.4

    2021.1

    Empty Scene
    Debug
    Frames: 628 - Average Frame Time 7.97ms - Average FPS 125.5
    Release Frames: 646 - Average Frame Time 7.75ms - Average FPS 129.0

    Empty Scene URP
    Debug
    Frames: 619 - Average Frame Time 8.09ms - Average FPS 123.6
    Release Frames: 648 - Average Frame Time 7.72ms - Average FPS 129.6

    Sample Scene URP
    Debug
    Frames: 597 - Average Frame Time 8.39ms - Average FPS 119.2
    Release Frames: 601 - Average Frame Time 8.32ms - Average FPS 120.1

    So... Empty scenes look pretty much unchanged, Sample Scenes 0.3ms slower since 2020.2 but interestingly ONLY in Release! So lets look at the Profiler Data:
    Unity_VqmUlNBxy0.png
    Check out the right panel in particular.
    The frame time distribution in 2020.2 is less wide, i.e. the extrema are brought in, the peaks are lower, the entire upper quartile actually progressed, and part of this could very well be down to changes to Time.deltaTime stabilization. But the Median has indeed gone up by these 0.3ms.

    Since some marker/function names changed, a direct apples for apples comparison in PA is a bit tricky, more so because this is down to a shift in the frame rendering pipeline and as we'll see in the next screenshot, time spend waiting on the Render Thread/GPU has gone down but would still be added to the main thread frame time here and there is no really good way to calculate that out of the overall frame time (checking only specific rendering sample times works but isn't necessarily a direct map to the frame time). I'm pondering some ways to make this more apparent, happy for suggestions.
    2020.1
    yeJrINTtwm.png
    2021.1
    dxpAfrcgJB.png

    So the rendering times have doubled (3ms -> 6ms) but the time spend waiting on the GPU has fallen drastically too (5.5ms -> 1ms). So not having any insight into what changed, I could assume the rendering is now preparing stuff better for GPU consumption, or commands to the GPU are spread out over a longer period so the GPU has more time to process them? Bare in mind this is a sample scene and depending on the load and content, this could scale better or worse?

    Anyways, I've reopened the report with this info and let the URP team decide that. Just posting here to keep you updated and provide a bit of insights into this.
     

    Attached Files:

    Last edited: Jan 7, 2021
    mikeohc, DrabanL, mahdi_jeddi and 3 others like this.
  11. Creepgin

    Creepgin

    Joined:
    Dec 14, 2010
    Posts:
    413
    Great findings! I guess it's really hardware dependent and is affecting folks with older specs more than folks with newer specs. I hope the URP team can address the issue in future versions because I do believe my specs i7 + GTX 1080 is still fairly common.
     
  12. Zarezy

    Zarezy

    Joined:
    Mar 11, 2014
    Posts:
    12
    Just upgraded from 2020.1.4f1 to 2020.2.2f1. My fps dropped from 90-100 to stable 50 in editor. Also got lots of issues with shaders, materials, many prefabs broke and other funny bugs. Another day working with unity.
     
  13. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    How much of that is actual FPS drop and how much just the change in the way the stats view calculates FPS as discussed in this thread?
     
  14. Zarezy

    Zarezy

    Joined:
    Mar 11, 2014
    Posts:
    12
    I usually had 90-100 fps shown in editor and almost the same amount in build (measured with different 3party utilities like fraps for example). Now I have 60-70 fps in editor and 60 fps in build. Maybe there is a new fps lock setting you guys added.
    Haven't tested it yet, mainly because the builds are 60(!!!) minutes for me now instead of 10. Before this version it was like this: first build is around 30 mins and 10 mins after that. Now It's always 60 minutes. Development build checkbox increased the build time up to 120 minutes (I went to sleep after it reached that mark, so I'm not sure how much it really took). The build was ready in the morning though. I think before this version Unity didn't suck up every unused asset inside the build. Now It does. Hence the increased build time.
     
  15. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    We didn't. Sounds like you were and are CPU bound (you should use the profiler to confirm this) and URP Render thread performance regressed, as I outlined above, and as we are tracking as issue 1277222.

    Regarding the build time regressions, I think that would.be worth a separate thread and maybe a bug report.
     
  16. Zarezy

    Zarezy

    Joined:
    Mar 11, 2014
    Posts:
    12
    Don't think so. I7-6700K should do just fine on scene with 0 scripts, no physics and just a few models to draw.

    It would. But I feel like it's a common problem in new version and someone will report it eventually. I do 1 build in a week to check possibly regression and I have a special rig for that.
     
  17. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    426
    wrote aboute broken volumetric fog and my post was deleted? nice...
    most fps drop in hdrp 10 causing by this.
     
  18. Zarezy

    Zarezy

    Joined:
    Mar 11, 2014
    Posts:
    12
    There are lot's of things broken. 45 fps in both editor and build with my scripts on instead of 90. This will be a first time I'm gonna roll back to my previous version. This version shouldn't made out of beta.

    Also I lost all my custom HDRP!!! shaders made in AmplifySE. I mean they all worked on previous HDRP version. We all have lot's of tasks to do on our own. Why Unity adding more tasks on our plates? I don't know even where to start with fixing the shaders.
     
  19. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    Wait, you're using HDRP? This thread and the performance regression bug we're all talking about in here is URP only. So whatever you're experiencing is it's own thing and maybe you should report a bug for that so that it can get fixed.

    I might be biased but I'm a fan of challenging/validating your performance assumptions by using appropriate tooling, like the Profiler.
     
  20. Zarezy

    Zarezy

    Joined:
    Mar 11, 2014
    Posts:
    12
    I thought HDRP is part of URP. My bad here.

    What I mean is how it can be possible, if the same CPU was doing just fine on previous unity version? If CPU bound is tied to this particular unity version than players in my game will get the same issue, meaning I should go to previous unity version and stick with it (as should the rest of us because we don't want to lose playerbase).
     
  21. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    URPs version shipped with 2020.2 is taking more time on the Render Thread, meaning you can get CPU bound where you previously wouldn't be, but it depends on your hardware setup. For HDRP, it uses the same underlying SRP framework but could be vastly different in the usage so I would not conclude the same root cause for both issues but rather track these separately.

    Now 2020.1 will no longer receive any fixes including those you might need to be able to ship to some platforms as they change their requirements so you do NOT want to lock down on that version for good, but aim at eventually upgrading to an LTS version like 2020.2 which will turn into 2020.3/LTS. I understand you might not want to stay on it for the time being until the issues are resolved but since we haven't identified your issue here, we don't know if it is even known and getting fixed so you might be waiting indefinitely.

    If you don't want to end up in a situation where you are somehow forced to update Unity while the regression is still on the version you'd upgrade to, just to be able to ship, and then ship a slower build, you should really investigate that issue (I've outlined how that could look like above), report it as a bug and only then roll back.

    Making assumptions about your performance and about issues being known and getting fixed is not going to help anyone much. But if you want to discuss this further, I'd suggest to create a new thread for HDRP specifically to not take this one further off topic.
     
  22. Zarezy

    Zarezy

    Joined:
    Mar 11, 2014
    Posts:
    12
    Low fps is visible even in scenes with 1 cube with hdrp/lit shader and no scripts. The rest of my team have exactly same fps drop on different rigs. So I'm not worried at all about the issue not being know.

    My platforms are win and MAYBE linux and mac, so I don't worry at all about staying on previous version.

    I don't have extra free time nor desire to be a free bug tester. We are your customers after all.

    I'm rolling back. No further discussion needed.

    @MartinTilo Personally I'm really satisfied by your support and willingness to help. But I'm choosing the easiest way out.
     
  23. slime73

    slime73

    Joined:
    May 14, 2017
    Posts:
    70
    For people who have reduced main thread CPU performance with HDRP 10.x + Unity 2020.2, you could try toggling the "Use Render Graph" checkbox in the HDRP Default Settings. The non-rendergraph codepath is going away in a future version but I found Render Graph adds significant overhead to the main thread.

    HDRP + Unity versions before 2020.2 didn't use Render Graph. Turning it off will make Unity use more graphics memory for screen textures and buffers than with it on, though.
     
    MartinTilo likes this.
  24. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    265
    Which version of Unity and SRP ?
     
  25. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    426
    no changes at all
     
  26. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
  27. Adam_Benko

    Adam_Benko

    Joined:
    Jun 16, 2018
    Posts:
    77
    Any update from URP team regarding this issue ?
    One more question, will the new 2020 LTS version (that should have been out already, probably covid delay) be based on 2020.1 ? Or will it behave regarding this issue that we have with CPU bottleneck, like the 2020.2 ?
    Thanks.
     
    DrabanL likes this.
  28. DrabanL

    DrabanL

    Joined:
    Nov 13, 2014
    Posts:
    31
    by the looks of it, the LTS version is the last version released in every year. which means 2020.2 (with the performance regression, unfortunately)
     
  29. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    If you are basing the assumption of when the LTS version should get released on the year it is released in, our addmittedly confusing version naming tricked you. The 2020 LTS version branch has been branched off of the main line in 2020, as 2020.2 turned beta. That branch is now just receiving fixes until it is marked LTS. I guess back in 2017 we should've started calling the version we were working on 2018, so that it is geared towards the LTS release date, but that ship has sailed I guess...

    As for the bug, I'm not working on it and just glanced at the bug ticket. It has an internal note on it from today so it is actively being worked on and the cause is still being narrowed down.
     
    Adam_Benko likes this.
  30. Pronotron

    Pronotron

    Joined:
    Aug 27, 2018
    Posts:
    7
    I tried to update from 2020.1.0b12 to 2020.2.f4.

    - Mesh rendering behavior has gotten awkward. Character seems more angular.
    - I'm not sure if it's a performance problem, but my character moving with physics was super jittery.

    I went back to the old version, really need some features that were in 2020.2.
     
  31. DrabanL

    DrabanL

    Joined:
    Nov 13, 2014
    Posts:
    31
    happy to report that the regression in performance has been resolved in 2021.1.0b10

    @MartinTilo thank you for your involvement in the issue
     
    Last edited: Mar 6, 2021
    LeonhardP and MartinTilo like this.
  32. codeviki

    codeviki

    Joined:
    Nov 18, 2016
    Posts:
    4
    Hello,
    I am using Unity 2020.2.6f1 on Arch Xfce on a system with Nvidia 1060 6GB. I have installed all the drivers Unity needs, but when ever I am using URP, the editor becomes super unreliable, every time I have to wait 15-20 after clicking the shader selection drop down for a material or some other tasks. From reading most of the thread,seem this might be specific to linux system. Has anyone else noticed this issue and has been able to make unity usable in URP.

    URP version 10.3.2

    Any help appreciated !
     
  33. restush96

    restush96

    Joined:
    May 28, 2019
    Posts:
    31
    Just moved from 2019.4.9f1 to 2021.1.0b10, I noticed a big difference. In 2019.4.9f1, it got 500-700fps in editor, but after in 2021.1.0b10 it went below 139fps.
     
  34. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    If you came to that conclusion based on the fps in the Stats overlay of the Game View, please read through this thread carefully.
     
  35. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    Not sure if this is a Linux issue but could you please file a bug report for that anyways? (Ideally a specific one, e.g. for the shader drop-down)
     
  36. restush96

    restush96

    Joined:
    May 28, 2019
    Posts:
    31
    I see, so now the FPS counter tells the truth. It answered my question in the past that my FPS counter in 2019 LTS doesn't match with editor stats.
     
    MartinTilo likes this.
  37. nico_st_29

    nico_st_29

    Joined:
    Mar 14, 2020
    Posts:
    31
    Hi,

    My URP project works fine in the Editor on 2020.1.17f1.
    However when I try updating to either 2020.3.1 or 2021.1.0 the performance becomes terrible - I am experiencing the same as some others on this thread: the game becomes painfully slow in Play Mode.

    I am happy to create another thread for that one but I believe my problem is similar to what quite a few developers I know are experiencing as well and similar to comments in this thread.

    I'm running Unity on 2017 iMac 27" with macOS Catalina (10.15.7) and a 3.4 GHz Quad-Core Intel Core i5 processor.
     
  38. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,073
    with a fps script that uses ongui, frequency 30 seconds, 2060rtx i5 8400

    editor fullscreen 1280x720:
    2020.1.17 105fps
    2021.1.1 80fps
    regression of 25%
     
  39. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    The fix for Issue 1277222 landed on 2021.1.0b10 i.e. before 2021.1.1 so what you are seeing is a different issue. Can you please file a bug report on it?
     
  40. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,073
    1326946, Tautvydas is on it.
     
    MartinTilo likes this.
  41. Alejandro-Martinez-Chacin

    Alejandro-Martinez-Chacin

    Joined:
    Oct 15, 2013
    Posts:
    93
    Is there a way to have a link to that issue? Can't seem to find it.

    Explanation:
    I have been having serious editor performance issues, don't know exactly when they started but related to:
    - Lag when clicking an Editor UI element (might be more than just inspector redrawing).
    - Sometimes clicking an object (say, the unfold arrow) might do nothing unless the mouse moves at least one pixel afterwards.
    - Clicking outside of unity and coming back is met with a frozen 2 - 3 seconds hangup (could be something like asset search for data changes on app focus)
    - I put as shortcut Shift+W to get inside the prefab stage and Shift+E to get out of it, however sometimes I have to do Ctrl+Shift+W and Ctrl+Shift+E... for it to detect it. This is not related to the thread itself but maybe there's something going on with Input events that's conflicting with the general performance?

    Don't know if some of these are macOS related or Unity specific. But overall it feels slower every update, currently on 2021.1.9f1.

    So, currently trying to collect and find out what are the existing performance related bugs and if they are either fixed/reported/on-going beforehand like that regression test shown in some comments above.
     
  42. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,073
    I don't know how to do that, this is a gofbugz# which is private.
    It would be very useful for all parties involved thought: a public facing database that can be searched by public issue# and by fogbugz too.
     
  43. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    6,852
    When they accept your bug report into the issuetracker it becomes available on the URL:
    https://issuetracker.unity3d.com/product/unity/issues/guid/<original-fogbugz-case-number>

    It isn't on issuetracker under your case number.
    https://issuetracker.unity3d.com/product/unity/issues/guid/1326946
     
  44. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,366
    QA wasn't able to reproduce it, so it was closed and never made public. If there's more hints as to how to repro it, it can get reopened though. For those waiting for something to be fixed, hoping it's the same issue they are facing: please just report individual bugs. Chances for overlap between these with just such a high level problem description seeming to match is low so you might just be waiting for the wrong fix. Also, more reports means more data and context to find such regressions better.
     
    DrabanL likes this.
unityunity