Hi all!
I have an odd performance issue which I can’t quite get to the bottom of. Before I start off, i am a 3D artist by trade but Im trying to learn some basic coding and game dev so im just getting to grips with coding best practices so apologies if this is an obvious questions or in the wrong thread. I’ve done some investigating into my issue and have a whole load of questions so I’ve collected my questions into a list at the end to help make this concise.
I’ve decided to create a basic mobile endless runner type game to learn some basic coding. I’ve created a very ugly proof of concept and launched the game to my phone for some general tests and performance checks.
I noticed when running on my mobile that the framerate was surprisingly low for such as basic scene. I ran a “stat unit” and noticed some bottle necking apparently on the Draw thread, however my draw count is still fairly low. I ran a renderdoc to see if there’s loads of draws or timely cals on the shaders but nothing out of the ordinary (I did this on PC so its not exactly accurate just a quick look).
[SPOILER]
https://forums.unrealengine.com/core/image/gif;base64
[SPOILER][/SPOILER]
I also noticed that the stat unit command looked different,( im used to it showing game,draw,GPU), it has Game, draw but also RHIT,Mem,Draws,Prims. missing the GPU?
I did a frontend session profile on my phone to get a deeper look and found lots of references to CPU stalls. Pretty much every thread, game, render, RHI, audio(no audio in the project yet) each have around 18ms of “CPU Stall”
[SPOILER]
I’ve tried completely stripping my game to bare bones of just a few road meshes and the player car moving forward but still has around 22ms in the draw thread. Im guessing the threads are waiting of the previous one to finish hence the stall? im not an expert on parallel rendering but im assuming the bottleneck is not likely to be in the draw thread?
So my questions are:
- Does mobile have a different “stat unit” details to desktop?
- What is the RHIthread?
- What are these CPU stalls?
- Is there any common culprits which can cause these long CPU stalls?
- My player car is moving forward using event tick, I know tick is very expensive, could this be a cause?
- I also can see in my game thread, around 6ms of GameEngine Tick which seems a little high? Is there a list of nodes which use tick to move objects for example, does “move component to” use tick?ect
Apologies for the long thread, just wanted to give some info about where I’ve gotten so far in my troubleshooting but I feel like i’ve gotten to a deadend now.
Any advice or articles that can be suggested would be greatly appreciated.
Many thanks