Unity8-dash render time is too high, causing frame skipping

Bug #1564721 reported by Daniel van Vugt
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Confirmed
High
Michał Sawicz
unity8 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Unity8-dash render time is too high, causing frame skipping

On a 60Hz display you have 16.6ms per frame. So to keep things running smoothly your render time should be much lower than 16.6ms.

$ restart unity8-dash MIR_CLIENT_PERF_REPORT=log MIR_CLIENT_FORCE_SWAP_INTERVAL=0
$ tail -f ~/.cache/upstart/unity8-dash.log

MAKO:

[2016-04-01 11:38:54.086901] perf: : 69.00 FPS, render time 13.96ms, buffer lag 29.76ms (3 buffers)
[2016-04-01 11:38:55.103637] perf: : 73.81 FPS, render time 13.00ms, buffer lag 27.33ms (3 buffers)
[2016-04-01 11:38:56.111953] perf: : 67.46 FPS, render time 14.19ms, buffer lag 30.60ms (3 buffers)

ARALE:

[2016-04-01 11:41:43.467067] perf: : 52.31 FPS, render time 18.54ms, buffer lag 61.60ms (3 buffers)
[2016-04-01 11:41:44.491750] perf: : 53.71 FPS, render time 18.01ms, buffer lag 37.43ms (3 buffers)
[2016-04-01 11:41:45.504621] perf: : 55.33 FPS, render time 17.53ms, buffer lag 37.03ms (3 buffers)

Note(1): I have used MIR_CLIENT_FORCE_SWAP_INTERVAL=0 because it works around a problem with the Android platform's MIR_CLIENT_PERF_REPORT=log being rounded up to the next frame interval. It also has the nice benefit of showing peak frame rate possible on a device (e.g. 73 FPS on mako above).

Note(2): Yes you can use the same benchmark on 'unity8' instead of 'unity8-dash' however the results will be inaccurate -- limited and rounded to whole frames due to bug 1369763.

Note(3): This is all possibly related to bug 1494795.

Tags: performance
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It's worth noting that mako just sneaking under 16ms sounds good, but also needs to do better. Because that still means it's using most of the time available to render a frame. And if the system had to do anything else at all during that time, you likely would take longer and miss a frame.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity8 (Ubuntu):
status: New → Confirmed
Revision history for this message
kevin gunn (kgunn72) wrote :

@duflu - just to double check, have you verified the actual refresh rate config of arale screen/display?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes, the arale display is 60.72Hz as shown by 'mirout'. But that's also irrelevant here as I'm using MIR_CLIENT_FORCE_SWAP_INTERVAL=0 to collect peak numbers that are independent of the physical refresh rate.

More data points for the sake of comparison (also running under Unity8 on the same phones):

MAKO:
mir_demo_client_egltriangle (about the simplest and fastest client imaginable):
[2016-04-04 10:46:20.018850] perf: : 282.60 FPS, render time 2.43ms, buffer lag 8.10ms (3 buffers)
[2016-04-04 10:46:21.023429] perf: : 332.66 FPS, render time 2.07ms, buffer lag 6.98ms (3 buffers)
[2016-04-04 10:46:22.024222] perf: : 297.70 FPS, render time 2.32ms, buffer lag 7.81ms (3 buffers)
mir_demo_client_eglplasma (a pathologically heavy fragment shader):
[2016-04-04 10:46:54.638567] perf: : 165.83 FPS, render time 4.78ms, buffer lag 13.32ms (3 buffers)
[2016-04-04 10:46:55.644152] perf: : 161.19 FPS, render time 4.88ms, buffer lag 13.79ms (3 buffers)
[2016-04-04 10:46:56.645983] perf: : 163.83 FPS, render time 4.84ms, buffer lag 13.49ms (3 buffers)

ARALE:
mir_demo_client_egltriangle (about the simplest and fastest client imaginable):
[2016-04-04 10:25:12.224706] perf: : 245.26 FPS, render time 3.24ms, buffer lag 8.98ms (3 buffers)
[2016-04-04 10:25:13.227914] perf: : 246.26 FPS, render time 3.21ms, buffer lag 8.97ms (3 buffers)
[2016-04-04 10:25:14.231324] perf: : 244.26 FPS, render time 3.25ms, buffer lag 9.02ms (3 buffers)
mir_demo_client_eglplasma (a pathologically heavy fragment shader):
[2016-04-04 10:26:35.991810] perf: : 90.81 FPS, render time 10.16ms, buffer lag 22.90ms (3 buffers)
[2016-04-04 10:26:37.001922] perf: : 91.08 FPS, render time 10.10ms, buffer lag 22.95ms (3 buffers)
[2016-04-04 10:26:38.004405] perf: : 90.81 FPS, render time 10.19ms, buffer lag 22.84ms (3 buffers)

So this shows it's possible to render super-smooth graphics in a Unity8 client on mako and arale. Only unity8-dash is letting us down.

description: updated
Changed in canonical-devices-system-image:
assignee: nobody → Michał Sawicz (saviq)
importance: Undecided → High
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.