Comment 3 for bug 1236508

Revision history for this message
Colin Ian King (colin-king) wrote : Re: unity8 (+Mir) draws more current and uses more CPU than non-Mir variant

I've re-measured Mir and non-Mir configurations and double checked my data to include surface flinger. For 300 seconds of complete idle I measured:

Context Switches/sec:
Mir:
   Voluntary: 214.88
   Involuntary: 1.85
   Total: 216.73
Non-Mir + Surface Flinger
   Voluntary: 28.56
   Involuntary: 1.45
   Total: 30.01

..so the Mir variant is context switching over 7 times more than the non-Mir variant.

CPU utilisation:
Mir:
   User: 0.15%
   System: 0.08%
   Total: 0.23%
Non-Mir + Surface Flinger
   User: 0.04%
   System: 0.01%
   Total: 0.05%

..so the Mir variant is consuming ~4.6 times more CPU than the non-Mir variant.

Total System Wakeup Events/sec:
Mir:
  Wakeup Events: 23.57
Non-Mir + Surface Flinger
  Wakeup Events: 0.20

..the Mir variant is creating >100 times more wakeup events than the non-Mir variant

Zero-timeout poll/epoll_wait calls/sec
Mir:
  Zero timeout polls: 2.32
Non-Mir + Surface Flinger
  Zero timeout polls: 1.23

..these are where poll() or epoll_wait() are called with a zero timeout, effectively like doing an immediate peek, which is wasteful because one could be doing a non-blocking read. It may indicate a bug somewhere, as normally one expects poll to be called with a blocking timeout > 0. Anyhow, the Mir variant is worse than the non-Mir variant.

Measured using:
  health-check, cpustat, eventstat from PPA:colin-king/white

Hope that contextualises the bug report.