Excessive RAM used by Firefox
I'm getting a strange jump in memory use by Firefox. I'm monitoring Firefox memory use with the add-on called "Memory Restart." I keep 13 pinned tabs on my browser (they always load at boot-up). Those 13 tabs take up around 140MB of RAM. I also tend to keep around 50-100 tabs in my browser (I used Session Manager). But when I boot up, none of those tabs open until I click on a specific tab. See screen shot -- this is how my Firefox session typically boots.
After all the pinned tabs load Memory Restart shows around 140MB in use. About 10 seconds later I get a "flash" on the screen with a yellow banner under the tab section that says "Firefox memory has increased by more than 669MB since last refresh interval" (see image). Something is causing Firefox RAM use to jump immediately from 140MB to 669MB about 10 seconds after all my pinned tabs load. What could be causing this immediate large chunk of RAM use, even though none of the non-pinned tabs have been selected. ???
所有回覆 (12)
Start Firefox in Safe Mode {web Link} by holding down the <Shift>
(Mac=Options) key, and then starting Firefox.
A small dialog should appear. Click Start In Safe Mode (not Refresh).
Is the problem still there?
https://support.mozilla.org/en-US/kb/websites-look-wrong-or-appear-differently
https://support.mozilla.org/en-US/kb/firefox-slow-how-make-it-faster
https://support.mozilla.org/en-US/kb/firefox-uses-too-many-cpu-resources-how-fix
https://support.mozilla.org/en-US/kb/firefox-hangs-or-not-responding
https://support.mozilla.org/kb/Firefox+is+already+running+but+is+not+responding
Also, I would try unpinning Facebook (to defer loading) to see whether it is the culprit. The news feed with its "endless scrolling" causes Firefox to use a lot of memory. If it's not Facebook, hmm...
Thanks jscher and Fred.
I started Firefox with just one tab open, and Memory Restart told me that Firefox was using 490MB, just by being open. Does that sound right?
If I start in safe mode, how can I tell how much RAM Firefox is using?
Open the computer's Task Manager.
In Safe Mode, does Firefox seem to run better?
I have 9 windows open, some with several active tabs, and the Windows 7 Task Manager "Processes" tab shows:
firefox.exe
- Memory (Private Working Set): 859,888 K (about 860MB)
- Commit Size: 913,272 K (about 913MB)
So 490MB for one tab seems high to me.
I don't know how Memory Restart counts memory use. Could you compare the Task Manager? Ctrl+Shift+Esc to launch it, and you can add columns that seem interesting using the View menu.
Looking at Task Manager / Firefox
Boot with one tab open in safe mode: 140MB
Boot with one tab in normal mode with all 15 add-on's active: 370MB
Booth with one tab in normal mode with all add-on's disabled: 220MB.
Did a test to see which of the add-ons are the memory hogs.
Ad Block Plus = 100MB (!) Session Manager = 20MB
The other 13 add-on's had far smaller RAM footprints.
Do these numbers sound about right?
My original reason for asking this question was that my Firefox browser is often far slower than Chrome. I did some tests this AM with browser benchmark s/w and all benchmarks showed Firefox 49 to be about 40% slower than Chrome. Which led me to start looking at memory management, etc..
Memory definitely is one factor. There's a new internal page called
about:performance
which can identify extensions and loaded pages which are causing a slowdown. I've peeked at it but don't really understand all of what it is telling me.
To load that page, type or paste its address in the address bar and press Enter to load it. Many times, it flags itself as slowing down Firefox!
There definitely are advocates for switching from Adblock Plus to uBlock Origin for performance reasons. I'm not sure where you can find a fair comparison, but you might look into it.
uBlock dropped my RAM usage about 90MB. Nice call! Thanks so much.
about:performance showed no red flags (except about:performance!!)
I actually did a number of changes to Firefox today, based on advice from the following sites:
http://wikimatze.de/making-firefox-as-fast-as-chrome http://www.makeuseof.com/tag/5-firefox-runs-slow-browsers-run-fast/ https://www.servethehome.com/firefox-is-eating-your-ssd-here-is-how-to-fix-it/#comment-361107 https://www.davidtan.org/tips-reduce-firefox-memory-cache-usage/
After all the changes, I re-ran Basemark. Firefox was 25% SLOWER. Haha.
Life is complex.
A lot of performance optimization checklists are based on assumptions about your system and sites you visit, and possibly older versions of Firefox, so you may need to reality-check a lot of those suggestions.
Do you notice a lot of disk access? That's a common bottleneck since spinning hard drives and even SSDs may be the slowest link, especially if you have a high speed unlimited use internet connection. In that case, some users have reported that reducing the disk cache size on the Options page improves overall performance.
Ah ha. I reduced the disk cache size and it increased my benchmarks by 35%. Thanks!
This totally sounds like a memory issue within Firefox. Which is an old issue that's never been resolved. At least for me. And I've been using Firefox since before it was Firefox. When it was Netscape. So when Mozilla came out with Firefox, I naturally switched over. That's when Firefox was awesome. Progressively got worse after 4.0.
However, I finally found a definite fix for my Firefox memory leak issue. I switched to Chrome. Seriously. Not by choice, but sheer necessity. Couldn't deal with how Firefox hogging memory was messing with my system. Yes, it was Firefox. Cuz when I quit Firefox, my system was happy again.
Since Firefox 4.0 came out, I've had memory leak issues (never a problem pre 4.0). And to this very day, still have memory leak issues. After 2 days of running Firefox it jacks up to using over 2GB of physical memory. 2GB!! I've tried all the tips. ALL THE TIPS. Let's make that clear. From forums to Firefox themselves. NOTHING works. NOTHING. Including the ones mentioned here. Then I finally found a fix! I switched to Chrome! Without having to jump through hoops or going into config and mucking around with settings. Plug and play if you will.
How do I know it was fixed, well let me tell you. I'm on a Mac system, I watch the memory usage on Activity Monitor. I loaded the same plug-ins and extensions that I used in Firefox, on to Chrome (lucky they had Chrome versions of them), and deleted the ones that weren't. So under the hood, when it came to plugins and extensions, they were the same. Both browsers are the latest versions. On a full reboot of my system. Then I did exactly the same things I've always done on Firefox on Chrome. Hitting the same sites, and downloading same files. Within 2 days, I checked Activity Monitor, Firefox was hitting around 1.7GB (started on launch at 487MB), Chrome...582MB (started on launch at 500MB). I let Chrome go without quitting for the rest of the week, and it never broke 600MB. And sometimes, it would even go down. Without me having to quit for it to release memory. THAT is how a browser should be dealing with memory. And really, it's neither faster or slower than Firefox.
I've never wanted to switch to Chrome, because I like the feel of Firefox better. As well, Firefox had better plugins/extensions and themes (imo). But now, they are on pretty much on par when it comes to those things. And although I still like the feel of Firefox better. I've gotten used to how Chrome feels. So not having memory issues anymore with Chrome vs slightly better feel when using Firefox, is more than a fair trade off for me. Sorry Mozilla, but you had to go. Firefox just messes with my system, no matter what I do.
This may not apply to all, but anyone that still have issues with Firefox bogging your system because of memory leaks? Switch to Chrome. And see for yourself.