Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.
RAM is not purged when closing tabs
I noticed that RAM is not purged when closing tabs in Firefox. I had several tabs open, and FF was consuming close to 1GB of RAM. I closed all but one tab, and RAM only dropped to around 800MB or so. Is there some way to force FF to purge unused RAM?
All Replies (14)
Memory usage is a moving target. In the paste, Firefox sometimes failed to release memory if an image load was interrupted. I'm sure there are other cases where things get stuck.
Although it's a manual operation, you might try the following the next time you see this. Type or paste about:memory in the address bar and press Enter. (You can bookmark this page.) Try the buttons on the right under the heading Free Memory to see whether those make any difference.
Unfortunately the buttons had little effect. Maybe 10-30MB freed up, but not that much, considering I have one tab open on a simple page. Of course, restarting Firefox clears up things. I feel like FF should do a better job at freeing memory when tabs are closed.
As I observe RAM usage, it looks like the longer I use Firefox, the more RAM keeps going up, and it never gets freed up.
Some time when it's convenient, as an experiment, try a similar pattern of browsing in Firefox's Safe Mode. If memory usage is much more modest, one of your extensions could be contributing to the problem.
You can restart Firefox in Safe Mode using
Help > Restart with Add-ons Disabled
In the dialog, click "Start in Safe Mode" (not Reset)
(I know it will be jarring to see all those ads, but it's for the sake of science.)
Nope, no difference. Total RAM consumption is lower by a couple hundred MB, but it doesn't free up much at all once I close all but one tab.
Sadly this is a long term issue now with firefox, defenitly in the last few versions at least has got worse. The problem is the only people who can do anythign about it (devs) tend to stick their head in the sand and just blame addons/plugins.
So in short same issue.
Firefox when first opened is fast and feels good to use.
Occasionally it will recover all ram when closing tabs but is now uncommon, usually what happens is when first started closing tabs will recover some memory. But then after a while it stops recovering memory at all as if something is 'stuck'. Whilst my rig has tons of ram I dont like wasted ram and in addition firefox becomes sluggish when this occurs, it feels laggier to use and will eventually if left in this state long enough start stuttering and even will crash.
Funyn enough on linux systems it runs much better, I think part of the problem is that windows is not a primary focus of firefox dev's they now concentrate more on linux, mobile etc. as windows doesnt even have a 64bit build.
So to clarify, memory usage is much more modest with no plugins (but also almost unuseable as without plugins fitrefox is hard to use), however the same core problem exists that memory does NOT recover on closing tabs.
Okulungisiwe ngu chrcoluk
Create a new profile as a test to check if your current profile is causing the problem.
See "Creating a profile":
If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over the problem
Hi chrcoluk, when you notice memory use above what you expect, could you try the buttons on the upper right section of the about:memory page to see whether they help?
You can bookmark that page so it's handy as needed or is auto-suggested in the address bar when you start typing it.
(I don't notice much if any difference when I use those buttons, which I think means that the use of about 1.2GB of memory is appropriate for the 29 tabs I have open.)
and what if the new profile doesnt work?
been there done that.
As I said.
Firefox with no plugins is a bad browser, certian plugins are needed for it to be good.
Without plugins on a clean profile it uses less ram, but the ram still does NOT recover on closing tabs. The browser of course still slows down as a result as GC/CC run for longer (since they have more memory to flush) and if left long enough firefox crashes.
I think you speaking to the wrong person, the problem is clearly the app/code not the end user config.
I think the problem is really is that developers have the attitude well modern hardware is powerful so we no longer need to make a memory/cpu efficient program, all that matters is new features and making it look pretty.
To give an idea how messed up the situation is eg. I might load a youtube page, this page might add a few hundred meg to friefox usage, if I then refresh the SAME page, it reallocates another few hundred meg, so whats the old few hundred meg doing at this point? if I then close the youtube tab probably 5-10% of that 600 meg or so would be recovered.
Okulungisiwe ngu chrcoluk
Hi chrcoluk, in your Youtube example, are you using the HTML5 trial or regular Flash video? Is the additional memory added to firefox.exe or to plugin-container.exe, or externally as Flash processes?
Firefox is so shitty but so is every other browser out there too so ..
Mine holds a bunch of sessionrecoveries (since I always kill the sucker to free RAM and unload tabs) and holds a bunch of humble bundle pages and some paypal ones.
If close tabs it takes forever (likely due to so much having been swapped out) but what's weird is the memory usage increase by 200-400 MB for each tab I close ..
VIRT 10.71 GB, RES 5.2 GB, Shared 10668 currently
I run Chrome now to post this so I won't switch over and have all the swap moved into RAM just to look at the numbers of tabs but there's likely about 12 or so humble bundle tabs and like 7 or so Paypal logins spread over three windows.
Bunch of retarded plugins in Fedora but I put them at never activate but haven't restarted since then, only extensions I ran was Adblock Plus which I know use a lot of RAM and FlashBlock, I disabled Adblock Plus but I don't know if that matters afterwards or whatever that could make it so tabs don't unload RAM which somehow was used up by Adblock Plus.
Nothing else going on, Firefox a gazillion or whatever version is the latest stable one on Fedora 20, 64 bit Linux on Athlon64 X2 with 8 GB of RAM and 16 GB of swap though as long as swap is starting to hit 5-6 GB one is doomed anyway so it's an unnecessary amount.
(Guess chrome may leak memory less and one can kill random threads and just purge some tabs that way, however sometimes chrome starts doing it's own thing and do random thing with the window/settings, I have no freaking clue why, using an USB keyboard and if you type under load it drops sequences of key-presses, I can't see why it would make up ctrl keys or alt keys or whatever but weird shit happens at least.)
Okulungisiwe ngu aliquis
I have observed that, after initial startup, Firefox displaces about 500 meg of RAM, and this can increase over a period of about 8-12 hours. However, what also happens is that it also starts taking more and more processor power, to the point of very nearly maxing out one of the processors on my i7 machine. The only way I've found to date to clear the issue is to shut down Firefox and restart.
I could have written your post. It's so frustrating. I have an i7 processor as well. I've been using FireFox about 8 yrs and have loved it till now. I run a RAM meter on my destktop to monitor my 12gb (plenty of muscle). A new FF browser opens at btw 9-14% RAM usage. No matter what I'm doing, even if I never open more than 3 or 4 tabs, my RAM percentage usage increases about 10% every 20 to 35 minutes! When my RAM percentage reaches 45-55% spontaneously, the browser crashes or freezes!. My patience is running low. I hate giving up several FF add ons I've become addicted to. Nevertheless I installed Chrome and transferred my bookmarks to IE as well. I'm ready to move when I'm pissed off enough. My band-aid has been to open the task manager and end the FF processes. This resets the RAM. Simply closing the browser and restarting is not effective.
Totally unreleated but my current Firefox session have one restore session tab, four tabs of a single Humble Bundle purchase (two different purchases) and three Paypal tabs either at the login prompt, logged in and finally one which I've ran Auto Refresh extension on every 10 seconds for a few days but I closed that tab and run it now on a new one but same session every 30 seconds.
Firefox uses 161.9% of my CPU according to top on an Athlon64 X2 6400+.
I have my normal blend of plugins (Fedora default + Flash enabled or not + BankID / Nexus Personal) + Adblock Plus installed beyond that Auto Refresh extension.
May be a plugin or extension thing or just something which doesn't work well together with firefox at the moment but regardless of what it is it totally suck.
Chrome suggested to use unstable somewhere so I did but their built in Flash doesn't seem to work in unstable and ocassionally it run out of file descriptors and some processes just die leaving a few dead tabs here and there. So Chrome isn't perfect either ..
But I wish some browser worked well and reliable.
Firefox seem to give memory back by now for me at least. Closed all other tabs and have 4.6 GB free + 1 GB swap so that's ok at least. Top says 21.5% memory of my 8 GB atm.