Re-enable automatic tab unloading when running out of memory
Categories
(Firefox :: Tabbed Browser, enhancement, P2)
Tracking
()
People
(Reporter: gsvelto, Assigned: toshi)
References
(Blocks 1 open bug)
Details
(Whiteboard: fission-soft-blocker)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
+++ This bug was initially created as a clone of Bug #675539 +++
In bug 1558930 we disabled tab-unloading-when-low-on-memory because of the various issue we ran into both with faulty low-memory detection and with tabs with active WebRTC sessions being unloaded.
I'm filing this to track the work needed to re-enable the feature.
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•3 years ago
|
||
We will try enabling this again if the Telemetry from the field show the memory pressure info is reliable and we fix bug 1701368. Gsvelto to coordinate.
Comment 2•3 years ago
|
||
Tab unloading is a nice-to-have for our Fission Release experiment, but doesn't need to block it. I will move this bug from Fission Milestone M8 to MVP.
Reporter | ||
Comment 3•3 years ago
|
||
Handing this over to Toshihito who's been doing all the work
Comment 4•3 years ago
|
||
This bug is a soft blocker for Fission MVP. We'd like to fix it before our Release channel rollout, but we won't delay the rollout waiting for it.
Assignee | ||
Comment 5•3 years ago
|
||
Comment 6•3 years ago
|
||
Is there also something like Chrome's chrome://discards to force tabs to be unloaded, to see why a tab was discarded and to see what's next to be discarded? :)
Assignee | ||
Comment 7•3 years ago
|
||
(In reply to Poopooracoocoo from comment #6)
Is there also something like Chrome's chrome://discards to force tabs to be unloaded, to see why a tab was discarded and to see what's next to be discarded? :)
Thank you for pointing out chrome://discards! I didn't know that page and personally loved it, especially the Graph visualization. Currently we don't have any similar UI. I'll file a bug to consider it in the future.
Assignee | ||
Updated•3 years ago
|
Comment 9•3 years ago
|
||
bugherder |
Comment 10•3 years ago
|
||
Setting status-firefox92=wontfix because we don't need to uplift tab unloading to Beta.
Comment 11•3 years ago
|
||
Chris, is that something worth mentioning in our 93 nightly/beta release notes? Thanks
Comment 12•3 years ago
|
||
(In reply to Pascal Chevrel:pascalc from comment #11)
Chris, is that something worth mentioning in our 93 nightly/beta release notes? Thanks
Yes. That's a good idea!
@ Toshi, please review my proposed note below about tab unloading for Firefox 93's release notes. Feel free to suggest a better description.
Release Note Request (optional, but appreciated)
[Why is this notable]: Tab unloading is expected to reduce Firefox memory usage and out-of-memory crashes. Tab unloading is only enabled on Windows in 93. Support for macOS (bug 1595627) and Linux (bug 1532955) is in progress for a later release.
[Suggested wording]: Firefox on Windows will unload some tabs when available system memory is low. This should help reduce Firefox out-of-memory crashes. Switching to an unloaded tab will automatically reload it.
[Links (documentation, blog post, etc)]: No documentation that I know of besides this bug.
Assignee | ||
Comment 13•3 years ago
|
||
@ Toshi, please review my proposed note below about tab unloading for Firefox 93's release notes. Feel free to suggest a better description.
Thank you for filling the template. They all look great. It might be more helpful to add information about which tab will be unloaded like this:
[Suggested wording]: When available system memory is low, Firefox on Windows will automatically unload some tabs based on their last access time, memory usage, and other attributes. This should help reduce Firefox out-of-memory crashes. Switching to an unloaded tab reloads it.
Comment 14•3 years ago
|
||
(In reply to Toshihito Kikuchi [:toshi] from comment #13)
@ Toshi, please review my proposed note below about tab unloading for Firefox 93's release notes. Feel free to suggest a better description.
Thank you for filling the template. They all look great. It might be more helpful to add information about which tab will be unloaded like this:
[Suggested wording]: When available system memory is low, Firefox on Windows will automatically unload some tabs based on their last access time, memory usage, and other attributes. This should help reduce Firefox out-of-memory crashes. Switching to an unloaded tab reloads it.
Note added to our 93 nightly release notes, thanks!
Comment 15•3 years ago
|
||
Now that this is on the way I hope next we could look into bug 1665885 which would prioritize unloading [hidden] ads on memory pressure events - a better first stop before unloading tabs.
Comment 16•3 years ago
|
||
Not sure if this was mentioned, but I had an extension/addon called "dormancy". Not sure if this is the same thing or not, but figured it might help. I'm hoping this new functionality will replace "dormancy" entirely. Let me know if this is related or the same as what you are working on. Thanks.
Comment 17•3 years ago
|
||
Not sure if this was mentioned, but I had an extension/addon called "dormancy". Not sure if this is the same thing or not, but figured it might help. I'm hoping this new functionality will replace "dormancy" entirely. Let me know if this is related or the same as what you are working on.
There's a number of these add-ons, either automatic (based on time), or manual. The main difference is that the new functionality has a more global view of all Firefox tabs and the system memory state (this part was added recently) so it can make the decision which tabs to unload automatically. The main goal of the built-in feature is to reduce the number of cases where Firefox would crash because the system runs out of memory. Now, if we detect that this is going to happen, we try to prevent (or delay) that by unloading inactive tabs.
From the description of the add-on, it's not 100% the same goal: the add-on minimizes Firefox memory usage. The built-in feature would keep Firefox using that memory (To keep it fast: reloading tabs is slow!) until we detect that this would cause system stability issues.
I expect this will be mostly useful on 4GB/8GB machines, or maybe beefier ones if you're running really memory intensive workloads.
Comment 18•3 years ago
|
||
(In reply to Gian-Carlo Pascutto [:gcp] from comment #17)
(To keep it fast: reloading tabs is slow!)
And also potentially loses some state on more complex pages.
Comment 19•3 years ago
|
||
(In reply to Gian-Carlo Pascutto [:gcp] from comment #17)
... not 100% the same goal: the add-on minimizes Firefox memory usage. The built-in feature would keep Firefox using that memory (To keep it fast: reloading tabs is slow!) until we detect that this would cause system stability issues.
I expect this will be mostly useful on 4GB/8GB machines, or maybe beefier ones if you're running really memory intensive workloads.
When you say "this will be mostly useful on 4GB/8GB machines", do you mean the extension/addon, or this bug?
Comment 20•3 years ago
|
||
When you say "this will be mostly useful on 4GB/8GB machines", do you mean the extension/addon, or this bug?
The built-in feature to prevent crashes. Those kind of machines are the ones where we see out-of-memory crashes the most (if it happens on larger machines it's often due to user misconfiguration like disabling page files etc).
Updated•3 years ago
|
Updated•3 years ago
|
Comment 21•3 years ago
|
||
Yes. Glad this is fixed. I have a fairly beefy machine relative to RAM, disk space, and CPU, but still have occasional issues with Firefox (current release) freezing occasionally. Probably because I have a crazy number of tabs open (173) because of constant research on various topics. Looking forward to seeing if this fix mitigates some of those issues.
Updated•3 years ago
|
Description
•