Mir

[android] External monitor slows rendering - part 2

Bug #1535894 reported by Alan Griffiths
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Undecided
Alan Griffiths

Bug Description

Setup:

$ sudo stop lightdm
$ mirbacklight
$ $ bin/mir_demo_server --file host --window-manager system-compositor --display-config sidebyside --compositor-report log
$ bin/mir_demo_server --host host --display-config sidebyside --custom-compositor adorning --background-color blue --launch-client 'MIR_CLIENT_PERF_REPORT=log mir_demo_client_egltriangle'

Observe: triangle spins evenly with FPS around 60.

Test: Plug in external monitor

Expect: triangle spins evenly with FPS around 60.
Actual: triangle motion slows and jerks with FPS around 45-60. Vis:

[2016-02-04 10:59:51.443282] perf: : 44.91 FPS, render time 31949.70ms, buffer lag 58.34ms (3 buffers)
[2016-02-04 10:59:52.443801] perf: : 44.00 FPS, render time 2.16ms, buffer lag 64.81ms (3 buffers)
[2016-02-04 10:59:53.459793] perf: : 51.18 FPS, render time 2.22ms, buffer lag 57.93ms (3 buffers)
[2016-02-04 10:59:54.459976] perf: : 60.00 FPS, render time 1.88ms, buffer lag 48.12ms (3 buffers)
[2016-02-04 10:59:55.490405] perf: : 59.22 FPS, render time 1.91ms, buffer lag 48.28ms (3 buffers)
[2016-02-04 10:59:56.493244] perf: : 60.87 FPS, render time 1.83ms, buffer lag 47.95ms (3 buffers)
[2016-02-04 10:59:57.493610] perf: : 60.00 FPS, render time 1.97ms, buffer lag 48.03ms (3 buffers)
[2016-02-04 10:59:58.494037] perf: : 60.00 FPS, render time 2.06ms, buffer lag 47.96ms (3 buffers)
[2016-02-04 10:59:59.507100] perf: : 60.21 FPS, render time 2.14ms, buffer lag 47.70ms (3 buffers)
[2016-02-04 11:00:00.508168] perf: : 57.94 FPS, render time 2.71ms, buffer lag 49.05ms (3 buffers)
[2016-02-04 11:00:01.524863] perf: : 59.05 FPS, render time 0.92ms, buffer lag 49.89ms (3 buffers)
[2016-02-04 11:00:02.525626] perf: : 60.00 FPS, render time 0.86ms, buffer lag 49.18ms (3 buffers)
[2016-02-04 11:00:03.526114] perf: : 60.00 FPS, render time 1.10ms, buffer lag 48.91ms (3 buffers)
[2016-02-04 11:00:04.540672] perf: : 59.17 FPS, render time 1.10ms, buffer lag 49.66ms (3 buffers)
[2016-02-04 11:00:05.541649] perf: : 46.00 FPS, render time 1.32ms, buffer lag 62.06ms (3 buffers)
[2016-02-04 11:00:06.543846] perf: : 45.90 FPS, render time 1.75ms, buffer lag 65.00ms (3 buffers)
[2016-02-04 11:00:07.560205] perf: : 45.27 FPS, render time 2.53ms, buffer lag 63.69ms (3 buffers)

Related branches

description: updated
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Interestingly, the host compositor reports ~60FPS (and also repeatedly switches into and out of "bypass"):

[2016-02-04 10:57:47.900691] compositor: Display 0xb1304660 averaged 59.412 FPS, 0.000 ms/frame, latency 8.190 ms, 60 frames over 1.009 sec, 100% bypassed
[2016-02-04 10:57:47.901087] compositor: Display 0xb1311aa0 averaged 59.462 FPS, 0.305 ms/frame, latency 7.955 ms, 60 frames over 1.009 sec, 76% bypassed
[2016-02-04 10:57:47.941740] compositor: Display 0xb1311aa0 bypass OFF
[2016-02-04 10:57:47.963471] compositor: Display 0xb1311aa0 bypass ON
[2016-02-04 10:57:48.008427] compositor: Display 0xb1311aa0 bypass OFF
[2016-02-04 10:57:48.030036] compositor: Display 0xb1311aa0 bypass ON
[2016-02-04 10:57:48.092450] compositor: Display 0xb1311aa0 bypass OFF
[2016-02-04 10:57:48.115005] compositor: Display 0xb1311aa0 bypass ON
[2016-02-04 10:57:48.159564] compositor: Display 0xb1311aa0 bypass OFF
[2016-02-04 10:57:48.181844] compositor: Display 0xb1311aa0 bypass ON
[2016-02-04 10:57:48.232569] compositor: Display 0xb1311aa0 bypass OFF
[2016-02-04 10:57:48.249172] compositor: Display 0xb1311aa0 bypass ON
[2016-02-04 10:57:48.295502] compositor: Display 0xb1311aa0 bypass OFF
[2016-02-04 10:57:48.320681] compositor: Display 0xb1311aa0 bypass ON
[2016-02-04 10:57:48.392740] compositor: Display 0xb1311aa0 bypass OFF
[2016-02-04 10:57:48.409587] compositor: Display 0xb1311aa0 bypass ON
[2016-02-04 10:57:48.906215] compositor: Display 0xb1304660 averaged 59.668 FPS, 0.000 ms/frame, latency 7.422 ms, 60 frames over 1.005 sec, 100% bypassed
[2016-02-04 10:57:48.906459] compositor: Display 0xb1311aa0 averaged 59.670 FPS, 0.250 ms/frame, latency 7.313 ms, 60 frames over 1.005 sec, 88% bypassed

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

OK, the inefficiency is in the nested server, the compositor "functor" for the "undamaged" output is scheduling composition passes because "scene->frames_pending(comp_id);" doesn't exclude buffers we want to ignore when assessing "damage".

Changed in mir:
status: New → In Progress
tags: added: performance
Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
milestone: none → 0.20.0
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Your test case appears to be flawed, or at least not relevant to Unity8.

Using mir_demo_server* on the Android platform, you will get the software cursor and thus also get bug 1373696, which is exactly what comment #1 shows.

However, bug 1373696 probably (hopefully!) doesn't ever happen with Unity8 as its cursor rendering is done internally. So your test case in the description here, as well as the log in comment #1 are not relevant to any problems with Unity8. All you've shown here is a duplicate report of bug 1373696.

So I'm going to mark this bug as a duplicate. And will continue reviewing the linked branches, but on their own terms.

If you can, please log a new bug for what you're aiming for that doesn't cross with bug 1373696 so much.

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

I agree there is definitely some kind of multi-monitor performance problem affecting Unity8, but it seems the information in this bug has clouded the issue too much in rediscovering bug 1373696 instead.

Changed in mir:
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Mir 0.20.0 is released.

Although the explicit fixes for this bug were all rejected and never landed. It mostly still looks like a duplicate of bug 1373696, which remains unresolved.

Changed in mir:
milestone: 0.20.0 → none
status: Fix Committed → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Another Launchpad glitch. It rejected my attempts to set Fix Released unless I also changed the milestone. Happens sometimes.

Changed in mir:
milestone: none → 0.20.0
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.