Closed Bug 1895985 Opened 1 year ago Closed 1 year ago

Ship Background Process QoS Adjustment

Categories

(Core :: XPCOM, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
relnote-firefox --- 136+
firefox136 --- fixed

People

(Reporter: haik, Assigned: haik)

References

Details

Attachments

(2 files)

This bug is filed to cover shipping the background process QoS work (bug 1805932). Putting the main thread of background processes is Nightly-only at this time while experimentation completes and any dependent bugs are addressed.

Depends on: 1864641, 1834629
See Also: → 1805932, 1876306
Assignee: nobody → kwright
Priority: -- → P2
Depends on: 1805932
See Also: 1805932, 1876306
Depends on: 1896172
Depends on: 1898057

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: kwright → nobody
Depends on: 1901603
Depends on: 1927609

Let macOS QoS support ride the trains. Enables macOS QoS modes to be used for
background IO threads and background process main threads.

Assignee: nobody → haftandilian
Status: NEW → ASSIGNED
Pushed by haftandilian@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f12097eae270 Ship Background Process QoS Adjustment on macOS r=mac-reviewers,mstange
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch

:haik is there anything you like to mention in a release note for this? (Process info)

Flags: needinfo?(haftandilian)

Release Note Request (optional, but appreciated)
[Why is this notable]:
We expect it to reduce Firefox energy use on macOS. The feature enables the use of quality-of-services classes on macOS so that some background tasks can be moved to lower power cores resulting in a significant effect on Firefox energy use.
[Affects Firefox for Android]:
None
[Suggested wording]:
On macOS, some background tasks will be moved to lower power cores resulting in less energy use.
[Links (documentation, blog post, etc)]:
None

relnote-firefox: --- → ?
Flags: needinfo?(haftandilian)

Thanks, added to the Fx136 nightly release notes, please allow 30 minutes for the site to update.
Keeping the relnote-firefox flag as ? to keep it on the radar for inclusion in the final Fx136 release notes.

(In reply to Haik Aftandilian [:haik] from comment #6)

[Suggested wording]:
On macOS, some background tasks will be moved to lower power cores resulting in less energy use.

I wonder if we should change the wording to say "background tabs" instead of "background tasks". I think it would make it clearer for users when then can expect to see battery life improvements.

I can make the change when I add it to the final Fx136 release notes, to say tabs instead of tasks.

Using the attached simulateBrowsingSession.py script, I've attempted to measure if the changes enabled with this fix lead to longer battery life. More testing is needed, but on this simulated browsing test, the changes appeared to increased battery life by significant amount.

The script opens 22 tabs and randomly switches between them, randomly performing scrolls and reloads.

Without the change, using Firefox 136 with just the script running Firefox and a Terminal window open, an M2 MacBook Pro ran for 13 hours and 17 minutes before suspending itself due to complete battery discharge. A total of 797 minutes.

With the change enabled for Firefox 136, the same configuration took 15 hours and 8 minutes before the laptop suspended itself. A total of 908 minutes.

Comparing the two, the changes appear to have increased battery life for this test by 1 hour and 51 minutes, a 13.9% increase. The effects on real battery life are likely to vary due to 1) different sites and different browsing behavior may use more energy 2) battery performance 3) the change affects background tab energy usage hence a session with more tabs would benefit more 4) Other programs being run or system processes (like downloading an OS update) contribute.

More testing is needed to have more confidence in the result.

Testing configuration:

Firefox 136
macOS 15.3 (24D60)
Apple M2 Pro
14-inch, 2023
16GB
Duplicate of this bug: 1678083
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: