Unknown Performance issue

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]

[/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]

[/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:

  1. Does mobile have a different “stat unit” details to desktop?
  2. What is the RHIthread?
  3. What are these CPU stalls?
  4. Is there any common culprits which can cause these long CPU stalls?
  5. My player car is moving forward using event tick, I know tick is very expensive, could this be a cause?
  6. 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

Hi

I’m afraid I don’t know what the problem is, and very rarely resort to performance overviews.

I can tell you a very effective way of profiling though it to remove objects and processes. Just chop huge chunks of stuff out and keep trying it, what makes the biggest difference?

It could be so many things. Right now I’m wondering about high poly meshes and coding problems.

If you can put a cut down version in a basic project I’ll take a look if you like…

Hi Clockwork,

Thanks for getting back to me, its definitely a bit of a tricky one but I really appreciate you offer of taking a look into it for me!

Im not 100% sure what you mean by putting it into a basic project but I have zipped up the project files so far and uploaded them to Gdrive its only around 3MB at the moment since its just very basic artwork, heres a link:

Let me know if thats okay as a format or if you’d like it in a different set up!

Many thanks :slight_smile:

That’s it :slight_smile: ( I’ll take a look )

Ok, I all looks fine :slight_smile:

Are you actually experiencing performance issues, like lags or low frame rates? I see no problems.

Well i wasn’t sure if the problem would gradually get worst as I start to bring in more assets and more materials. It’s currently capping at 44fps on mobile so it doesn’t give too large of a bandwidth to work with so i wanted to see if I could address this issue early!

But im glad to hear it looks all good on your end, really appreciate you taking a look for me :slight_smile:

No worries. Not a big fan of the profiling stuff, it can lead you in the wrong direction unless you totally know what you’re doing with it.

To be honest, I don’t know if 44fps is good on mobile. I would continue the way you’re going ( you have a good grip of the principles ), and wait until something is actually wrong, as it will also be easier to diagnose then :slight_smile: