Open
Bug 1195790
Opened 10 years ago
Updated 3 years ago
[meta] YouTube uses a lot more power in FF than Safari on OS X
Categories
(Core :: Audio/Video: Playback, defect, P3)
Core
Audio/Video: Playback
Tracking
()
NEW
Tracking | Status | |
---|---|---|
platform-rel | --- | - |
People
(Reporter: jrmuizel, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Keywords: meta, power, Whiteboard: [Power:P1] [platform-rel-Youtube])
Attachments
(1 file)
12.75 KB,
text/plain
|
Details |
This is a tracking/metabug
From just looking at Activity Monitor we spend more time in the WindowServer and more time in FF. It would be nice to do better.
Comment 1•10 years ago
|
||
Jeff - is this a graphics issue or a media playback issue?
Reporter | ||
Comment 2•10 years ago
|
||
Probably a combination of a different things. I chose the component arbitrarily.
Updated•10 years ago
|
Component: Audio/Video → Audio/Video: Playback
Updated•10 years ago
|
![]() |
||
Comment 3•10 years ago
|
||
I did some measurements during a 30 second window while watching https://www.youtube.com/watch?v=1Y1ya-yF35g using tools/power/rapl and powermetrics.
Nightly:
> total W = _pkg_ (cores + _gpu_ + other) + _ram_ W
> #01 12.56 W = 9.79 ( 1.59 + 1.22 + 6.98) + 2.77 W
>
> Name ID CPU ms/s User% Deadlines (<2 ms, 2-5 ms) Wakeups (Intr, Pkg idle)
> firefox 84433 154.49 65.00 13.96 2.90 90.82 44.26
> plugin-container 84435 407.53 42.52 47.82 28.66 196.23 94.75
Safari:
> total W = _pkg_ (cores + _gpu_ + other) + _ram_ W
> #01 7.53 W = 5.60 ( 0.44 + 0.24 + 4.92) + 1.92 W
>
> Name ID CPU ms/s User% Deadlines (<2 ms, 2-5 ms) Wakeups (Intr, Pkg idle)
> com.apple.WebKit.WebContent 84463 67.84 82.77 0.00 0.00 162.86 130.37
> com.apple.WebKit.Networking 84462 46.93 47.22 0.03 0.00 0.50 0.40
> Safari 84460 0.38 43.24 0.00 0.00 0.27 0.20
> com.apple.Safari.SearchHelper 84466 0.13 52.02 0.00 0.00 0.07 0.03
Chrome:
> total W = _pkg_ (cores + _gpu_ + other) + _ram_ W
> #01 11.94 W = 9.38 ( 1.36 + 1.63 + 6.38) + 2.56 W
>
> Name ID CPU ms/s User% Deadlines (<2 ms, 2-5 ms) Wakeups (Intr, Pkg idle)
> Google Chrome Helper 84483 379.27 89.58 0.00 0.00 128.37 86.68
> Google Chrome Helper 84481 79.01 66.29 0.33 0.00 110.34 74.59
> Google Chrome 84476 95.33 70.31 1.20 0.47 75.89 52.22
Interesting that Safari is much better for all power estimates: cores, GPU, other and RAM.
Comment 4•10 years ago
|
||
Safari would also typically have a VT service process running which is where the h264 decoding would be happening. Though it should also have been used with Firefox (chrome uses ffmpeg instead)
![]() |
||
Comment 5•10 years ago
|
||
(In reply to [PTO Until 08/Sep] Jean-Yves Avenard [:jya] from comment #4)
> Safari would also typically have a VT service process running which is where
> the h264 decoding would be happening. Though it should also have been used
> with Firefox (chrome uses ffmpeg instead)
If I run this command:
> sudo powermetrics --samplers tasks --show-process-coalitions --show-process-gpu -n 1 -i 5000
then processes get grouped into "coalitions", like this:
> Name ID CPU ms/s User% Deadlines (<2 ms, 2-5 ms) Wakeups (Intr, Pkg idle) GPU ms/s
> com.apple.Safari 488 44.27 95.57 56.06 15.74
> com.apple.WebKit.WebContent 84679 43.77 86.64 0.00 0.00 94.59 55.88 15.17
> com.apple.WebKit.Networking 84678 0.41 64.68 0.00 0.00 0.20 0.20 0.00
> Safari 84676 0.35 29.93 0.00 0.00 0.40 0.00 0.00
In the full output (attached) I don't see any process with a name like "VT service".
![]() |
||
Updated•10 years ago
|
Whiteboard: [Power]
Comment 6•10 years ago
|
||
What is the difference in the system power consumption measured at the wall? Does disabling e10s make a difference to Firefox?
![]() |
||
Comment 7•10 years ago
|
||
(In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #6)
> What is the difference in the system power consumption measured at the wall?
I don't know. These measurements are just processor (include integrated GPU) and memory. Other hardware, esp. the screen, will use more power.
> Does disabling e10s make a difference to Firefox?
It causes a slight improvement. More numbers shortly...
![]() |
||
Comment 8•10 years ago
|
||
Bug 1195767 appears to have helped a bit here. I did a 30 second sample with
tools/power/rapl and powermetrics on the video at
https://www.youtube.com/watch?v=P8pjd1QEA0c:
Before bug 1195767:
> total W = _pkg_ (cores + _gpu_ + other) + _ram_ W
> #01 12.99 W = 10.19 ( 1.64 + 1.28 + 7.27) + 2.80 W
>
> 1 sample taken over a period of 30.000 seconds
>
> Name ID CPU ms/s User% Deadlines (<2 ms, 2-5 ms) Wakeups (Intr, Pkg idle) GPU ms/s
> com.apple.Terminal 293 566.98 290.32 138.78 236.26
> firefox 24984 177.74 60.63 12.70 2.50 88.07 42.78 205.36
> plugin-container 24985 401.25 43.83 50.81 30.32 201.76 95.73 30.83
> Terminal 694 5.75 90.85 0.00 0.00 0.40 0.23 0.00
> com.apple.WebKit.WebContent 86444 0.17 62.04 0.00 0.00 0.00 0.00 0.00
After bug 1195767:
> total W = _pkg_ (cores + _gpu_ + other) + _ram_ W
> #01 12.34 W = 9.53 ( 1.23 + 1.27 + 7.03) + 2.82 W
>
> 1 sample taken over a period of 30.000 seconds
>
> Name ID CPU ms/s User% Deadlines (<2 ms, 2-5 ms) Wakeups (Intr, Pkg idle) GPU ms/s
> com.apple.Terminal 293 390.97 283.30 142.93 237.81
> firefox 27178 174.26 61.63 14.19 1.90 89.46 46.31 205.20
> plugin-container 27179 215.00 68.13 51.78 25.06 193.42 96.43 32.62
> Terminal 694 5.93 88.76 0.00 0.00 0.37 0.17 0.00
> com.apple.WebKit.WebContent 86444 0.12 62.42 0.00 0.00 0.00 0.00 0.00
The reduced CPU usage in the content process almost halved, which translated to a 0.65 Watt reduction.
I also tried disabling e10s. After bug 1195767, e10s disabled:
> total W = _pkg_ (cores + _gpu_ + other) + _ram_ W
> #01 11.90 W = 9.09 ( 0.98 + 1.26 + 6.84) + 2.82 W
>
> 1 sample taken over a period of 30.000 seconds
>
> Name ID CPU ms/s User% Deadlines (<2 ms, 2-5 ms) Wakeups (Intr, Pkg idle) GPU ms/s
> com.apple.Terminal 293 351.94 260.63 142.28 241.54
> firefox 27248 350.58 71.77 52.65 27.29 260.14 142.05 241.54
> Terminal 694 5.09 91.65 0.00 0.00 0.40 0.17 0.00
> com.apple.WebKit.WebContent 86444 0.13 62.06 0.00 0.00 0.03 0.03 0.00
A little better.
(BTW, see
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/tools_power_rapl
and https://developer.mozilla.org/en-US/docs/Mozilla/Performance/powermetrics
to understand exactly the measurements shown here.)
Comment 9•10 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #7)
> (In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #6)
> > What is the difference in the system power consumption measured at the wall?
>
> I don't know. These measurements are just processor (include integrated GPU)
> and memory. Other hardware, esp. the screen, will use more power.
The system total isn't the right thing to optimise. However measuring it gives you two pieces of information:
1. An estimate in the impact of the difference in CPU usage. i.e. a comparison of watch hours
2. A cross check to make sure we're not missing some part of the total
> > Does disabling e10s make a difference to Firefox?
>
> It causes a slight improvement. More numbers shortly...
Both numbers are informative. We want to consider how we compare to Safari without e10s and how we compare to Chrome with e10s.
![]() |
||
Comment 10•10 years ago
|
||
> The system total isn't the right thing to optimise. However measuring it
> gives you two pieces of information:
>
> 1. An estimate in the impact of the difference in CPU usage. i.e. a
> comparison of watch hours
> 2. A cross check to make sure we're not missing some part of the total
Sure. The other factor is ease of measurement. I wrote about this in some detail at https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Power_profiling_overview#Power_and_power-related_measurements
![]() |
||
Updated•10 years ago
|
Whiteboard: [Power] → [Power:P1]
Comment 11•10 years ago
|
||
For completeness, I've been looking at playback perf for VP9 on OS X.
I've measured using Intel Power Gadget to graph power usage and CPU/GPU frequency. I'm new to power profiling, so there maybe flaws in my methodology, but I'll summarize what I think I discovered.
Instead of making tables of values, I took screenshots: http://people.mozilla.org/~dglastonbury/Power/
The quadrants are:
TL: Firefox playback
TR: Chrome playback
BL: Firefox playback with blank decoder module
BR: Firefox playback with VP9 decoding but skip inserting frame into ImageContainer (So the frame is never composited)
Looking at 1080p 60fps shows that while the CPU power usage is higher by ~5W (I suspect from the higher avg. CPU frequency), system power usage is almost double. Comparing "blank decoder" to "no compositing of video", demonstrates that the current path for getting frames into the compositor is inefficient.
Updated•10 years ago
|
Flags: needinfo?(milan)
Updated•9 years ago
|
platform-rel: --- → ?
Updated•9 years ago
|
Whiteboard: [Power:P1] → [Power:P1] [platform-rel-Youtube]
Mass change P2 -> P3
Priority: P2 → P3
Updated•9 years ago
|
platform-rel: ? → -
Updated•9 years ago
|
Flags: needinfo?(milan)
Updated•4 years ago
|
Summary: YouTube uses a lot more power in FF than Safari on OS X → [meta] YouTube uses a lot more power in FF than Safari on OS X
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•