(IN-52428) FPS is lower when running on 2022.3 and Application time increases past 16ms

IN-52428
@JussiKnuuttila Now I only realize this massive regression at mobile platform that the performance of Entities Graphics 1.0.14 (600 ms+) is around 37x+ slower than 0.51.1 (16 ms) at stress test scene. Tested with Mi 9T Pro (Snagdragon 855) that it's solid 16ms for almost all the scenes at 0.51.1 but at 1.0.14 there's quite a number of scenes are extremely slow. From what I observed, seems like 1.0.14 uploads too much redundant data to GPU and quickly make it GPU bound. Note that the material is using simple shader graph instead of default regular urp lit shader.

Is this the stress test scene in the sample? Does the same happen if you switch URP to its regular Forward mode (it is probably Forward+ by default in 1.0)?

Nope. It’s old 0.51 sample. I upgraded it to 1.0 and stress test it again. Tried both Forward and Forward+ still get 1-2 ms.

Are you sure it’s GPU bound, and that there are no post processing effects or similar which could be causing issues outside of the actual draw calls?

While there have been some changes to the shader code between 0.51 and 1.0, there shouldn’t be anything drastic enough to explain a speed difference this large, so something very surprising might be happening here.

Yes. It’s just very basic scene with no post processing and nothing fancy. See the screenshot below.

9228957--1289031--upload_2023-8-17_17-59-37.png

To clarify: this is the StressTest scene in the official sample?

Yes at 0.51 sample but it’s removed at 1.0 sample. Btw at 1.0 sample u can get similar significant slowdown at scene 9/19, 10/19, 16/19 and etc too but not super extreme at stress test scene though.

@JussiKnuuttila Have u found the root cause of issue? From my further testing and observation, looks like it's caused by 2022.3.7f1 brg plus vulkan and opengl regression. I believe the regression is there since 2022.2.0f1 up until latest 2022.3 release. At 2021.3.29f1, it's able to get solid 60 fps for most of scenarios i.e. camera far from scene or super near to scene and will drop certain amount of fps when camera near to certain distance but at 2022.3.7f1, at vulkan is insanely slow no matter which camera distance but at opengl camera goes quite far or goes super near to visual entities can get solid 60fps but still not as fast as 2021.3.29f1 yet. Btw currently I'm collecting all the official samples and port to dots 0.51. Let me know if u need it.

Hi! We also repro the perf regression even on PC. It’s an issue with proper BRG batch size calculation, when using Vulkan backend only.
We’re working on a fix, thanks for your report.

3 Likes

Not really. Although at 1.0 with OpenGLES3 is faster than 1.0 with Vulkan but it’s still significantly slower than 0.51 with Vulkan. Btw let me know when the fix lands on which editor version after u push the fix to production. Oh yeah and also u can just run the project at case IN-52428 which I setup all the slow scenes for u to compare side by side

Hi. Will the fix ship at next 1.1 release or later?

Hi. The fix and several back ports have landed. Regarding 2022.3 the fix landed in 2022.3.10f1. ( btw it's editor fix only. (no need to update entities.graphics package)

1 Like

I just tried 2022.3.10f1 and see the improvement but it’s still significantly slower than 2021.3.30f1. At 2021.3.30f1 most of the scenes able to get 60 fps specially 9/11 EntityCreation and 11/11 TransparencyOrdering are always solid 60 fps but 2022.3.10f1 still can’t achieve it.

Do you know if the significantly slowdown is more GPU or CPU related? any unity timeline profiler capture of the two version could help. Also are you talking about the VK version? or GLES?

I believe it’s more GPU related. Here’s the profiler capture of the two version (Profiler - Google Drive) profile from TransparencyOrdering scene. I’m talking about VK version since 0.51 release only support VK. But from my test at 2022.3.10f1, I also found that GLES version is significantly slower than VK version that one of the stress test scene is 25+ms slower.

seems to be GPU bound as you said. I guess your two runs ( 2021.3 and 2022.3 ) doesn’t use the same URP package right? Any chance to do a GPU capture on the device? Maybe we could get some clue like some post process are active in recent URP or something else.

Ya. 2021.3 is using URP 12.1.12 meanwhile 2022.3 is using URP 14.0.8. Which GPU capture should I use?

Any tool will do NVidia NSight for NVidia GPUs, AMD Radeon GPU Profile or Intel GPA. If you are on mobile you can send us the capture using Android GPU Inspector. Send us captures from both and we can compare. Also even before that, it might be good to just compare the RenderDoc captures for both to see if there are extra post-processing calls or draws happening with the newer one - this won’t give the timings, but might be quick to just compare if there’s some extra processing happening on the GPU.

Here’s the RenderDoc capture (https://drive.google.com/drive/folders/1GLZPB_2SdEIQ8kk8pHfTIzyOIusRvybN?usp=sharing). Btw is that official side not able to reproduce the same performance issue using similar Snagdragon 855 Android devices? My repro device is Xiaomi Mi 9T Pro. Anyway seems like at 2022.3 it spends insane amount of time to render same 3D cube model compares to 2021.3. Not sure why.

@arnaud-carre You can ignore the GPU capture at previous post since I fixed the performance issue. But I still have performance issue at some scenes at 2022.3 still significantly slower than 2021.3. This new GPU capture (https://drive.google.com/drive/folders/1O9RHXzq1vgvLFRTPQGcbu6So00U6L0Fx?usp=sharing) from StressTestHybrid scene has 2ms differences that 2022.3 is 19ms compares to 2021.3 which is 17ms.