Open Bug 1797832 Opened 2 years ago Updated 1 year ago

Firefox has ~10x the energy impact on macOS Ventura 13.0 compared to macOS Monterey 12.6.1

Categories

(Core :: Widget: Cocoa, defect, P5)

Firefox 106
defect

Tracking

()

REOPENED

People

(Reporter: 4x31aue7h, Unassigned)

Details

(Keywords: power)

Steps to reproduce:

Upgrade to macOS Ventura 13.0 or perform a clean wipe of the operating system and install macOS Ventura 13.0 (performed both with same result).

Open Activity Monitor and switch to the energy tab and monitor the Energy Impact of Firefox and its subprocesses. Open a fresh install of Firefox and use it normally, or specifically refresh a webpage.

Actual results:

Energy impact jumps to ~300 up to 1,000+. 12 hour power reporting ~300.

Expected results:

Energy impact should jump at most to ~30 and 12 hour impact should remain around ~20 as experienced upon downgrading back to macOS Monterey 12.6.1. Other applications such as Spotify don't experience the same jump in energy impact between macOS versions.

I'd like to add that since I downgraded back to macOS Monterey I can't quite provide much followup diagnostic information as I didn't record it at the time I had macOS Ventura installed. I don't know if this is improper, but I thought I would report it here to open it for further discussion as I couldn't find any existing bug reports regarding the same issue.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1420699
Resolution: --- → DUPLICATE

Before I close this as a duplicate of the rather general bug 1420699, would you be able to collect two Firefox profiles, one on Ventura and one on Monterey? You can do this by going to https://profiler.firefox.com/, selecting "Power" under the profiler settings and then uploading the profiles.

Status: RESOLVED → REOPENED
No longer duplicate of bug: 1420699
Ever confirmed: true
Flags: needinfo?(mlabrador123)
Resolution: DUPLICATE → ---
Keywords: power

(In reply to Stephen A Pohl [:spohl] from comment #4)

Before I close this as a duplicate of the rather general bug 1420699, would you be able to collect two Firefox profiles, one on Ventura and one on Monterey? You can do this by going to https://profiler.firefox.com/, selecting "Power" under the profiler settings and then uploading the profiles.

Hello, I was able to capture a profile on Firefox 106.0.4 and macOS Monterey 12.6.1 which can be viewed here: https://share.firefox.dev/3DAypOJ. If I do upgrade to macOS Ventura again in the future I will upload a profile for that as well, however perhaps someone may be able to provide a Ventura profile in the meantime. Thank you.

Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Flags: needinfo?(mlabrador123)
Resolution: --- → INACTIVE

Hello, have captured a profile on Firefox 108.0 on macOS Ventura 13.1.

The issue is still persisting as far as I can tell. 12 hour power showing ~323 for Firefox in Activity Monitor and my second highest application only reports a 12 hour power of ~16. The profile can be found here: https://share.firefox.dev/3PwqgjW.

I couldn't include screenshots in the upload because it'd make the profile too large, but I accessed the same websites in the same manner as I did in the previous profile except I waited for an ad on the YouTube video so the following actions appear later.

Also, here is the link to the Firefox Profiler containing both the Monterey 12.6.1 Firefox 106.0.4 profile and the new Ventura 13.1 Firefox 108.0 profile: https://share.firefox.dev/3PttkgN.

Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---

And Firefox v108.0.1's "System Requirements" webpage, haven't-yet mentioned macOS 13 -- is this bug, why ?

https://www.mozilla.org/en-US/firefox/108.0.1/system-requirements/

And Firefox v108.0.1's "System Requirements" webpage, haven't-yet mentioned macOS 13 -- is this bug, why ?

I created bug 1806280 for the "System Requirements" to be updated

Markus, would you be able to take a look at the profiles here?

Flags: needinfo?(mstange.moz)

Thank you, Miles, for these profiles. Unfortunately, nothing jumps out immediately - definitely nothing that would explain a 10x increase.

I've been looking at the "Process power" tracks of various processes, e.g. the YouTube content process and the Parent process. Making 25-second selections and comparing the "Energy used in the current selection" values from the power track tooltips, I can see maybe a 1.5x increase, but this could also be explained by a slightly different sequence of events, for example the ad playing before the video.

To compare power usage between video playback, I looked at a two-second interval in both profiles where the YouTube video was playing.
macOS 12: https://share.firefox.dev/3WElO4U, content process: 112µWh, parent process: 200µWh
macOS 13: https://share.firefox.dev/3HTR9wo, content process: 206µWh, parent process: 299µWh

These numbers indeed show a 1.5x-2.0x difference. (But not the 10x from Activity Monitor.)

I'm not sure what to make of this. The main questions are still open:

  • Has the actual physical power usage changed, or just these numbers? Both the Activity Monitor as well as the "Process power" numbers are based on heuristics and approximations, and Apple is free to change these calculations in OS updates. But what matters is whether the machine lasts longer on a single charge. Finding that out would take quite a bit of effort.
  • If the heuristics have changed, why is Firefox affected more than other apps seem to be? What's special about Firefox?
Flags: needinfo?(mstange.moz)

I have not tested macOS 13, but in the previous versions of macOS I have tested, the Energy Impact was mostly based on the CPU time + CPU core wake-up count (where waking up a core was charged the equivalent of 0.2ms of CPU time), with one notable oddity: wake-ups of threads using the real time priority (which we use for audio threads, that wake-up very often) were not counted. Maybe this has changed in macOS 13?

Severity: -- → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.