#(IN-35139) [CC 1.0.0-exp.2] Extremely slow performance at mobile plaform

1 messages · Page 1 of 1 (latest)

keen maple
#

I just tried the online fps sample player runtime build at Android and it's really slow for both CPU and GPU. Looks like CC package is not battle tested at mobile platform with/without dots netcode yet and dun have mobile input UI. Tested at Mi 9T Pro, CPU takes 6ms+ and GPU I believe is GPU bound that CPU waiting for over 15ms+. Will official improve it at next update?

chilly thicket
#

I'll look into this.

Do you have a snapshot of the profiler that shows what the CPU is spending the most time on, by any chance?

keen maple
#

(IN-35139) [CC 1.0.0-exp.2] Extremely slow performance at mobile plaform

keen maple
chilly thicket
#

Thank you!

chilly thicket
#

Here are my findings

The image below shows the timings for an IL2CPP build (much faster than mono) on a Galaxy s22. Keep in mind this project was built with PC/Consoles hardware in mind, and there hasn't been any work to implement mobile controls, or to optimize anything for mobile.

  • The GPU bottleneck is due to a default 30fps limit on mobile. This isn't an area I'm very familiar with so I don't know the specifics of why this happens, but setting QualitySettings.vSyncCount = 0; and Application.targetFrameRate = 60; in code will make the framerate cap change to 60fps.

  • With the way the project is set up by default, the same application will run both the client and the server in order to be able to play right away without having to setup a server. In the profiler screenshot, you'll notice there are two SimulationSystemGroup; one for client and one for server. Normally, the server simulation would be running on a separate machine and the phone would only be running the client simulation. This would reduce the update cost by quite a large factor

  • Within the client simulation group, most of the cost is coming from built-in Netcode and Physics systems. The character update only accounts for around 0.1ms out of 1.75ms in this case

keen maple
# chilly thicket Here are my findings The image below shows the timings for an IL2CPP build (muc...

Thanks for your finding. I think when official work on mobile platform support, it's better to use the lowest spec Android phone that can support dots project as benchmark to battle test this CC package performance. Let me know the part which makes it very slow at mobile platform when u work on mobile platform support. Curious to know which part make it not mobile friendly.

  • For GPU bottleneck issue, I see you are using Galaxy s22 which has super powerful Snapdragon 8 Gen 1 processor. I set to run at 60 fps but it's still very slow that can't even get 30 fps at Mi 9T Pro which only has Snapdragon 855 processor that has significantly lower spec compares with Galaxy s22.

  • I host the game at editor as client and server and then phone joins the game as client only that connects to editor then u will not see server world at phone. But default world is still at there that takes quite large amount of time to run and should be remove when in game.

  • At Mi 9T Pro with Snapdragon 855 processor, it's taking really long time. You can try to test at much lower spec Android phone again. From my testing, client simulation group takes 7ms+ to execute. I think will need u work with dots netcode and physics team side by side and also further improve CC performance whenever possible to further optimize mobile platform performance. Currently it's too slow even at Snapdragon 855 processor that I believe it will even slow at lower spec phone.

chilly thicket
#

Android phone that can support dots project as benchmark to battle test this CC package performance. Let me know the part which makes it very slow at mobile platform when u work on mobile platform support.
What takes most of the time isn't really the CC itself; but instead it's the network prediction loop as a whole (which includes building physics, updating gameplay, updating character, etc...). If you look at the profiler, you'll notice that the PredictedFixedStepSimulationSystemGroup is run many times on the client. In the profiler snapshot you sent with the report, this group is sometimes run up to 14 times per frame. The fact that it is run many times is normal and it is how netcode prediction should work, but like I said above, this is a project built for PC/consoles hardware.

A mobile version of this project would most likely need the simulation tickrate to be lowered, in order to reduce the performance impact of network prediction. Mobile action games like this can sometimes have a tickrate as low as 15hz, but this project currently has a 60hz tickrate, which means the game simulation is 4x heavier than it could be. Same goes for the GPU side: a mobile version of this game should have much lower graphics settings (shadows, postfx, antialiasing, shaders, etc...). I've also noticed that I get much better GPU performance if I choose OpenGLES3 as my graphics API rather than Vulkan

However, we will keep looking at possible improvements on our side. I agree that we should validate that performance is good on low-end mobile, but just know that we cannot really use this project as benchmark in its current state, since it was not optimised for mobile

muted pond