Firefox doesn't release memory after closing tabs
Categories
(Core :: General, defect)
Tracking
()
People
(Reporter: jeremy9856, Unassigned)
Details
(Keywords: memory-footprint, Whiteboard: [MemShrink:P3])
Attachments
(6 files)
| Reporter | ||
Comment 1•8 years ago
|
||
| Reporter | ||
Comment 2•8 years ago
|
||
Updated•8 years ago
|
| Reporter | ||
Comment 3•8 years ago
|
||
| Reporter | ||
Updated•8 years ago
|
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
| Reporter | ||
Updated•8 years ago
|
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
| Reporter | ||
Comment 11•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
| Reporter | ||
Comment 12•8 years ago
|
||
| Reporter | ||
Comment 13•8 years ago
|
||
| Reporter | ||
Comment 14•8 years ago
|
||
| Reporter | ||
Comment 15•8 years ago
|
||
| Reporter | ||
Comment 16•8 years ago
|
||
Comment 17•8 years ago
|
||
| Reporter | ||
Comment 18•8 years ago
|
||
Updated•8 years ago
|
Comment 19•8 years ago
|
||
Comment 20•5 years ago
|
||
Firefox doesn't release the memory back to the OS. This can lead to thrashing and useless writes to virtual memory. I have to restart firefox every once in a while. Some webapps can use Gigs of RAM, without releasing that memory back to the OS it means some time later unused memory will be written to disk which will cause unexpected jitter throughout the OS and increases potential for thrashing.
Comment 21•5 years ago
|
||
benzakhar: You need to provide proof and clear steps to reproduce for statements.
Comment 22•5 years ago
|
||
I'm sorry I bring no new information, these are the steps that also reproduce for me as mentioned above.
- Open htop to observe memory used by firefox
- Open a couple tabs that consumes memory
- close the tabs
- observe on htop that a significant amount of memory is still held by firefox
- restart firefox and notice that firefox has a way less memory footprint.
I didn't know about:memory. I'm going to try those buttons next time instead of restarting firefox. Sorry I brought no new information that the people above have given, just frustrated as recently I needing to restart firefox quite a bit.
Comment 23•3 years ago
|
||
Glad to help diagnose this bug, please let me know what data I can provide.
Issue still present in Firefox five years after initial bug was cut, has been persistent all these years with no discernible improvement across any of the 12+ devices I've used, multiple OS (Linux, MacOS, Windows).
An example from today on Ubuntu 20.04 with Firefox 100.0.2, 32 GB RAM. After closing dozens of tabs so I only have 6 tabs left open, Firefox memory usage stayed at ~12 GB as though I closed no tabs. Using the buttons in about:memory to initiate GC and such has only minor effect, decreasing memory usage to ~4 GB. As other posters mention, the only fix that reliably works is closing Firefox and reopening, at which point memory usage for the exact same 6 open tabs fell from ~11 GB to ~4 GB!
The site which most reliably triggers this issue for me is Amazon.
Comment 24•3 years ago
|
||
(In reply to holocronweaver from comment #23)
Woops, typo fixed below. Should have been 11 GB, not 4 GB.
Using the buttons in about:memory to initiate GC and such has only minor effect, decreasing memory usage to ~11 GB.
Updated•3 years ago
|
Comment 25•2 years ago
|
||
I confirm the same issue on 116 on Windows.
After some time of opening / closing several tabs, memory usage remains permanently elevated, even if I go back to the original tabs I had open.
Using "minimize energy usage" in about:memory does reduce memory usage a bit, but it never recovers to the level used by the original tabs.
It remains fairly high.
Description
•