3
$\begingroup$

I am making an iOS game using Unity. I am testing some shaders that I have made for the game, and in some cases the device will run at under 30 FPS but not have 100% device utilization.

Sometimes a test will start at a higher device utilization %, and then over time go lower, even though the test is simply rendering a plane with a material on it.

For example, a shader test I just ran on an iPad 4: Device utilization 85% Renderer utilization 85% Tiler utilization 1% Core Animation Frames Per Second 12

This test is using barely any CPU, and is only rendering 4 triangles (2 big planes covering the screen).

Does anyone have any ideas why this could be happening? Usually the renderer utilization goes up to 100%... pretty stumped, being a graphics rookie.


IOS has mandatory v-sync. I am curious why the "Core Animation Frames Per Second" in the Instruments profiler would say 12 FPS if v-sync is enabled, and how that would correspond to the 85% device utilization.

Perhaps the device is rendering 12 frames, and 2 are dropped to get it down to the v-synced frame rate of 10? That would result in ~83-84% effective device utilization.

Or perhaps it is that given the above stats (85% utilization and 12 FPS), the GPU could render 14 FPS if at 100% usage. However v-sync requires either 10, or 15 FPS, nothing in between. This may result in the GPU slowing down, to not waste power and CPU, but still remain safely above the next step down on v-sync.

$\endgroup$
  • 1
    $\begingroup$ Is VSync enabled? It could be the CPU is waiting for the next available frame. If the GPU takes say 20ms to complete its tasks, the CPU will wait for the next frame which would occur at ~33ms (16.6x2ms), meaning the GPU will idle for ~13ms. $\endgroup$ – PaulHK Feb 7 '17 at 3:06
  • $\begingroup$ Hey PaulHK sorry my stack overflow account here is brand new, and something messed up with my registration so I cannot comment on my own post. Your idea that it is v-sync is an interesting one. [converted from an answer - rest of content too long for a comment moved to the question - trichoplax] $\endgroup$ – Gerald Lang Feb 7 '17 at 5:13
1
$\begingroup$

Generally, with VSYNC, your CPU is effectively doing nothing 99% of the time, as it merely sent the simple vertex buffer batch (few triangles, as you said) to the driver. If the shader is bandwidth-heavy, it takes multiple frames to render. In your case, you said it's 12 fps, e.g. 60/12 = 5 frames. So, the CPU (or the core that runs your thread), is literally doing nothing for 5 frames (other than waiting for vsync). That's an egregious waste of performance for a 3d engine.

Why is the 'utilization' statistics important, anyway ? What matters is your framerate, that's how you know how well you're doing, not some arbitrary 'utilization' number in the OS, that god-knows-how it got assembled in the first place.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.