Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Quest barebones performance test, huge performance hit in unity 2020.1.0b5

Discussion in '2020.1 Beta' started by CGPepper, Apr 12, 2020.

  1. CGPepper

    CGPepper

    Joined:
    Jan 28, 2013
    Posts:
    147
    I am trying to establish a baseline for Oculus Quest performance.
    • Empty scene
    • gradient skybox from oculus
    • 1 primitive object with mobile vertex lit shader, set to static, baked lighting.
    • 4x default multi sampling
    • VR with barebones XR management, oculus Multi Pass (multiview had rendering problems in 2020)
    Exported to oculus quest i get following results in OVR Metrics tool

    Both do 72 FPS but

    2020.1.0b5

    CPU level 4
    GPU level 4
    CPU usage 40%
    GPU usage 89%

    Without anything at all, i am already hitting GPU limits

    2019.3.8f1

    CPU level 2
    GPU level 2
    CPU usage 19% (14% without AA)
    GPU usage 35% (29% without AA)

    I'm actually a bit surprised that 1/5th of the processing power is already taken.
    AA is probably taking a lot, but without it, the visuals are just horrible.
    Also noticed that the default export resolution is 1300x1200 pixels, while the editor version with link renders at 2000x1800

    Just an opservation, though i'd share.

    upload_2020-4-12_10-59-19.png

    upload_2020-4-12_11-16-22.png
     
    Last edited: Apr 13, 2020
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Probably want to use URP. Failing that you probably want to practise good mobile guidelines anyway (the default scenes are not good mobile guidelines - for example change shaders/remove shadows etc etc).

    Is this a beta specific issue? I noticed you said multiview wasn't working for you but does it work on 2019.3?
     
  3. CGPepper

    CGPepper

    Joined:
    Jan 28, 2013
    Posts:
    147
    Yeah, i think it's a beta issue. It's probably just not optimized for performance right now.
    Maybe i am using URP wrong, but the performance tanks compared to the mobile shader, vertex lit.
     
    hippocoder likes this.
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    The screenshot indicates you aren't using URP though (potentially)

    upload_2020-4-12_17-29-59.png

    Don't forget the URP options are controlled in the pipeline asset.
     
  5. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,085
    Can you try with and without AA? We noticed when we used AA that*everything* was unexplainablely slower. I'm talking about everything from Culling to Fixed Update to user script Update loops. Everything was much slower over all with AA enabled. Here's is a screenshot using 2020b3 with URP with AA on and then off. The culling is highlighted in bright green but you can see how everything else is proportionally slower too. We are developing on mobile though so it may be unrelated.
    unknown.png
     
  6. CGPepper

    CGPepper

    Joined:
    Jan 28, 2013
    Posts:
    147
    I've removed the 2020 installation as it consistently destroyed performance on quest.
    On 2019, turning AA off increased GPU load (level 2) from 35 to 29. CPU went from 19 to 14. But visually, it's like playing on a 360x360 screen

    @hippocoder Yeah, i'm not using URP after initial tests were much slower than vertex lit mobile shaders
     
  7. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Right well on Quest all I can say is it's fine with 150,000 polys, 5 lights, all per pixel, no scaling funny business and all lit PBR. This is using around 80% of frame time and a smooth 72 frames per second.

    I think the issue here is you're probably without realising it, not using the best mobile guidelines like:
    • use only MSAA 4x
    • no realtime shadows
    • no post FX
    Dynamic resolution scaling is likely to be slower in some cases on versions of URP depending if they've fixed FFR.

    So I'm quite sure Unity can do something like Red Matter, because I've put it through it's paces. I was doing this in August last year on Universal Pipeline.

    So with that in mind you should probably have another go but remember, less is more. You really don't want to be using post effects or realtime shadows (baked is fine).

    If it is slow on URP, you could post a bug report as Unity considers URP always faster than built-in pipeline.
     
  8. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,798
    @hippocoder, you say you were doing that last August... have you tried in 2020? I haven't tried any of this myself, but it sounds like @CGPepper has found an issue (bug?) specifically with the 2020 version.

    Also, perhaps you could make your 150,000-poly/5-light/PBR 72-fps example available somewhere as a complete demo project? I see a lot of threads here about poor performance on Quest, possibly because of inappropriate out-of-the-box settings (and I know that I, for one, am overwhelmed by the new rendering pipelines). A good project like that would both serve as a great starting point for Quest development, and a quick way to find regressions in performance in new Unity versions.
     
  9. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    These are documented over and over, there are even blog posts with URP projects for VR, and the rest is common mobile practise. I've been helping Unity and the community for years but I'll decline at providing a project. That's not what I do.

    It's enough for me to say it's possible, so people can then - as it is their time and not mine - choose to try that or not.

    The responsibility is 100% unity's and they need to step up in many areas. In the case of this thread I suspect things that are *really* anti-mobile are being used, like shadows. Also there is a complete URP VR project on the unity blog.

    I'll help and advise but I won't be doing Unity's job, as it's something that they are responsible for.
     
  10. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    castana1962 and JoeStrout like this.
  11. brazzoni

    brazzoni

    Joined:
    Sep 2, 2021
    Posts:
    13
    I had gutted my entire project (with source control) to systematically figure out what the GPU usage hit was for me. TLDR, pay attention to GPU Usage not frame rate and disable HDR. You will lose framerate if your GPU is overheating (it will overheat if you're constantly hitting it with +80% usage).

    Sorry for the necromance, but this page has a high SE ranking, and it was somewhat unsolved.

    In that first screen shot it looks like disabling HDR wasn't even an option yet. Maybe the setting was somewhere else, or maybe HDR wasn't enabled and the issue was something else. Regardless, it is an option in 2020 now.

    MSAA 4x is definitely a performance hit like 20% GPU. It's probably be worth it if you have the overhead.

    You'll notice in these tests that I skipped HDR once, not noticing a difference in the toggle. My FPS dropped was caused by a constant 70 - 100% GPU usage. Disabling HDR saves you like 30% GPU usage. These results were obtained using the Oculus Developer Hub.

    Straight Ahead = Looking at the horizon
    Down = Looking straight down at my controllers and the terrain
    No Change = no significant change (it could've dropped by an avg fps of 1, but I wasn't precisely recording results, I had a feeling it was something big that I needed to toggle off)
    • Switching terrain to Micro Splat: Straight ahead 30 > 40 fps, down 30 > 45 fps.

    • Removing Trees and details: Straight ahead 40 > 60 fps

    • Turn off bloom in post processing: 30 > 31 fps.

    • Setting Sky box to none: Straight Ahead 60 > 72fps, down 60 > 60 fps

    • Removing ‘Generate Mip Maps’ from floor textures: Straight Ahead 72 > 72, down 60 > 60 (the drop from 72 is correlated with a raise +17 stale frames and + 5 early frames)

    • Change Lighting to disable main light and additional lights per vertex: Down 60 > 55

    • After the lighting change above, baking the scene: No change

    • Disabling my FixedTimestepSetting: No change

    • Removing every last rock: No change

    • New Scene. Just terrain and player and XR stuff: No Change
    Powered Off Headset (Suspected overheating causing restarts and lower frame rates)
    • Disabled HDR: 72 flat across the board

    • Re-enabled HDR: 72 flat across the board… It was the overheating that caused the frame drop.
    Need to focus on the GPU utilization
    Current GPU Utilization: straight ahead 70%, down 97 - 100%

    • Remove the terrain: Straight ahead 70%, down 92%

    • Remove empty Update() methods. In all scripts on Player: straight ahead 70-80%, down 89%

    • Remove volume, disable VideoCastingCamera, post-processing behaviour, disable command server, disable animator: No Change

    • HDR and Anti Aliasing Disabled (in URP settings and on Camera): 30% (Success)

    • Turning Anti Aliasing on camera back on: No Change

    • Turning Anti Aliasing in URP Settings back on to 4x: ~50%

    • Turning HDR backing on: ~80%

    • Turning HDR off: ~50% (Yu gonplei ste odon)
     
    malik1 likes this.