High memory usage on Facebook
Categories
(Core :: JavaScript Engine, defect, P2)
Tracking
()
Performance Impact | medium |
People
(Reporter: dcarter, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf:resource-use)
Attachments
(8 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0
Steps to reproduce:
I keep three tabs open at all times: facebook.com; youtube.com; twitter.com
Within a couple hours of use, the system fails to respond. This is happening on multiple platforms (MacOS, Ubuntu 18.04)
Actual results:
Updates become impossible. Images fail to load. System crawls due to lack of resources. This problem seems to get worse with each successive release.
Expected results:
Pages should load as normal (as they used to up until a couple of months ago)
I started noticing performance issues a few months ago (can't remember exactly when) on multiple platforms.
My primary browsing machine is a standard MacBook Air:
Model Name: MacBook Air
Model Identifier: MacBookAir7,2
Processor Name: Dual-Core Intel Core i5
Processor Speed: 1.6 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 3 MB
Hyper-Threading Technology: Enabled
Memory: 4 GB
My secondary platform is an 8 core Opteron, 12 GB memory, Ubuntu 18.04
Facebook is the first to fail. Updates start but never complete. Images stop loading. If I close the tab and open a new one it acts like there was never a problem. The other pages take longer to exhibit symptoms, but eventually they all do. Again, closing the tab and creating a new one usually fixes it. It's worse when I reselect the tab after I've been in a different tab for a while. Sometimes, it is better to just restart the program.
Reducing the number of content processes from the default 8 to 4 buys me some time, but not much.
This is now the single biggest resource hog on all of my systems. I can't run anything else and firefox at the same time, and it seems to be getting worse with each successive release
Noticed the same on
- Windows 10 2004
- Ryzen 5 1600
- 16 GB DDR4 3000 MHz RAM
- GTX 1660 Ti
Right after Firefox launches, it takes about 2 GB RAM and everything works smoothly. Then, I open a couple of Reddit tabs, play a YouTube video, visit Facebook, and even after I close all those tabs, memory usage is at about 10 GB. I have to wait for every action to happen. Even now, I type this text in mostly blind, and wait until the content of the texbox catches up to what I wrote.
True, I do have 800 tabs open, but I never had those issues even at my peak of 2500 tabs.
Comment 3•4 years ago
|
||
David, thanks for taking the time to report this. Could you please take a memory report from about:memory? Here are the steps you need to take to get the memory report:
- Wait until Firefox is consuming a large amount of memory
- Enter about:memory in the URL bar and press enter
- Click "Measure and save" (optionally with "anonymize" checked to hide URLs, although this will likely make it more difficult for us to figure out which site, if any, is causing the leak)
- Save the memory report somewhere
- Attach the report to this bug.
I've attached 3 files showing increasing memory usage over the course of a morning with 3 tabs open, facebook, youtube, and twitter. By the time of the third snapshot, I had to restart the browser
Comment 8•4 years ago
|
||
Andrew, when time allows, could you please have a look over these memory reports? Thanks!
Comment 9•4 years ago
|
||
The main thing I can see going wrong is that Facebook is using more and more memory. The process with Facebook doesn't even show up in the third report, presumably because the process took too long to respond. It is up to 3.2GB by the second report.
There's 383MB of just strings. Lots of stuff like "3508390505862552{"RELAY_INCREMENTAL_DELIVERY":true,"UFI2CommentsProv". I'm not sure what that means. There's about a gig of JS classes.
It looks like the Adobe Acrobat extension has a content script for Facebook. I don't know if that could be causing the memory to rise somehow. You could try disabling that and see if it helps.
Reporter | ||
Comment 10•4 years ago
|
||
Reporter | ||
Comment 11•4 years ago
|
||
Reporter | ||
Comment 12•4 years ago
|
||
Reporter | ||
Comment 13•4 years ago
|
||
Attached 3 new files, again showing memory increasing with the Adobe plugin disabled. It was slower, but still a problem. This one spanned 10-12 hours instead of 4, and wasn't quite at the same level. It was having issue playing videos, one of the symptoms that tells me it's time to restart.
Comment 14•4 years ago
|
||
I have the same problem. Memory increases linearly and the program (Firefox 81.0) becomes unresponsive
Comment 15•4 years ago
|
||
Comment 16•4 years ago
|
||
The memory usage doesn't look super high in the about:memory report in comment 15. Did you do "Minimize memory usage" or anything like that before you got the memory report? One thing I did notice in the facebook process is that there's a ton of fragmentation. Almost 80MB of unused-gc-things, about 60MB of bin-unused. That could happen if there was a lot of memory being used, but then it was freed.
Comment 17•4 years ago
|
||
Yes, I did it. I tried to take control of the program, because in this situation I can't take change a tab, everything is run very slow. The problem only affects when the card with fb.com is opened. I disabled all extensions, but problem still exist. The only solution I know is terminate FF. By the way.. I was totally surprised when about:memory showed me an xml parsing error.
Comment 18•4 years ago
|
||
I suspect that this is a matter of configuring the drivers and hardware in one of the laptops, because on another laptop this problem will not occur with the same version of system, extensions and FF.
Comment 19•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 20•4 years ago
|
||
Can this be closed as having the same root cause as Bug 1674295?
Updated•4 years ago
|
Updated•4 years ago
|
Comment 21•3 years ago
|
||
triaging
:sdetar as mentioned in comment #20 Can this be closed as having the same root cause as Bug 1674295?
Comment 22•3 years ago
|
||
:nbp, do you have thoughts if this can be closed as mentioned in comment #20?
Comment 23•3 years ago
|
||
(In reply to Kim Moir [:kmoir] ET from comment #21)
:sdetar as mentioned in comment #20 Can this be closed as having the same root cause as Bug 1674295?
Bug 1674295 root cause is related to the fact that ffmpeg is installed or not on the computer, and specific to Linux.
At least this is the only way known to reproduce it.
I do not see anything here suggesting that installing ffmepg
remove the problem.
Updated•3 years ago
|
Comment 25•1 years ago
|
||
This hasn't had any movement in years. Firefox and Facebook have changed a lot in that time, so if anybody is continuing to experience issues with Facebook, please file a new bug.
Description
•