Search Unity

iOS stuck at 50 fps, while CPU and GPU utilization is only 30%

Discussion in 'iOS and tvOS' started by IgorAherne, Aug 3, 2018.

  1. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    339
    Hey guys, after heavy optimizations I've managed to get my game to a decent framerate on iPhone 6 - I am getting 50 frames per second.

    What's weird is while monitoring the compiled Unity project from xCode, I can see that device is only using 30% of its horsepower.

    My character stands in one spot in a completely static environment, and every once in a while the framerate climbs up to 60 fps, (and is shown in xCode), then quickly goes down to 46-50 fps.

    Have a look at what the xCode is saying:

    CPU:
    Screen Shot 2018-08-03 at 9.30.22 PM.png

    GPU:

    Screen Shot 2018-08-03 at 9.17.19 PM.png

    and here is energy: (maybe something to do with thermal? ..hmm, but utilization is still low on GPU and CPU, there should be no heat throttling yet!)

    Screen Shot 2018-08-03 at 9.43.08 PM.png

    Screen Shot 2018-08-03 at 9.43.17 PM.png

    As you can see, energy graph shows only purple and green bars - GPU and CPU. So these two are the only ones we need to read in the "interpretations" spoiler.

    Is there a setting in Unity to squeeze-out these extra 10 frames? Device Utilization allows for that
     
    Last edited: Aug 4, 2018
  2. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    339
  3. Atrixx

    Atrixx

    Joined:
    Feb 8, 2012
    Posts:
    17
    This is also happening to me hmm.
     
  4. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    339
    I am not too sure, but this might be related to garbage collection.

    We can now switch to Unity 2019.1, because it finally has the Incremental Garbage Collector, that doesn't cause FPS spikes at equal timeframes, but collects across several frames. This might help, but I haven't yet checked if that indeed was the cause for iOS.
     
    Last edited: Feb 11, 2019