Search Unity

Huge Overhead on iOS device

Discussion in 'iOS and tvOS' started by PDZ, Feb 19, 2014.

  1. PDZ

    PDZ

    Joined:
    Sep 12, 2013
    Posts:
    18
    When profiling on our ipod 4gen there seems to be a massive amount of the CPU being taken up by Overhead. On device it is around 80% but on pc it is around 8%. What is Overhead and how can it be reduced? It is causing FPS issues in our game.

    Game is being developed with c# using 4.3

    $Screen Shot 2014-02-19 at 17.03.40.png

    $Screen Shot 2014-02-19 at 17.04.00.png

    Thanks in advance
     
    Last edited: Feb 19, 2014
  2. AmazingRuss

    AmazingRuss

    Joined:
    May 25, 2008
    Posts:
    933
    Seeing the same thing on 4.5.2
     
  3. unimechanic

    unimechanic

    Joined:
    Jan 9, 2013
    Posts:
    155
    The overhead is the total frame time minus the duration of everything else that's been actively profiled (such as your scripts). This overhead isn't broken down into smaller details at all, but it will consist of things like the processing done internally by the Unity engine. In theory, the more complex your level/game the more overhead you're likely to see.

    Now, you could try setting the frame rate to a fixed value, like 30:

    http://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html
     
    MrEsquire likes this.
  4. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hi,

    I tried adding the above Target frame rate code, but I get same issue on iOS8/iPhone.
    "Overhead" is consuming over 60 percent CPU within the Profiler connected to the iPhone.
    I have no idea how to start debugging this, currently using 4.6b20
    Also disabled VSYNC and the code works as in Editor FPS is capped at 30.

    Any further ideas?

    This seems to only be happening when I do "iOS profiler over USB"
    Made a Xcode Build etc
    When running profiler in Editor the issue is not present at all.

    I'm using Prime31 plugins for iOS, not sure if these are culprits.
     
    Last edited: Oct 9, 2014
  5. Gavin-Park

    Gavin-Park

    Joined:
    Dec 16, 2013
    Posts:
    2
    From my experience, when you're profiling app with your iPhone connected, the "Overhead" consuming percentage goes higher when the frame rate of the app on your iPhone is low. So if you set Application.targetFrameRate higher(you can choose from 15, 30, 60), the percentage will go lower.
     
    SimteractiveDev likes this.
  6. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Yes, most of the time "Overhead" means waiting for VSYNC on iOS. And you can't turn it off, because OS doesn't provide a way to do it.
     
    SimteractiveDev likes this.