Firefox and RAM! Aghhhhh!!!!

2391558330_ea2219f2f74294967296 bytes or random access memory! In other words, 4GB of RAM. That is the amount of volatile memory I have on this here my computer. Now, when Firefox, for some reason, takes up 1.5gig with only two tabs open, it gets me wondering…WHAT THE HELL IS ITS PROBLEM!

I did some googling and yes, Firefox is a memory hog. A major one. I am using the latest version, 10 I think (I sort of lost track since Firefox moved their versioning system to match Google’s Chrome and just churn out major version releases every 2 days…) and despite them saying several times in there ChangeLogs that they have fixed the memory leaks in the app, and blaming most of the leaks on their cool COOL add-ons, still no respite in the memory area. I even considered using Chrome as my default browser, but until Chrome catches up with Firefox with addons (or extensions as they call them) like DownThemAll, NoScript and FoxyProxy, Firefox it is.

Anyhow, now, some more googling has turned up probable solutions for fixing Firefox’s memory leaks. Some of which I will share here but what I really want is help guys. Apart from the few methods I will state below, if you have any other proven methods that work in reducing Firefox’s memory leaks, please state them in the comments. Thanks ya’ll!

Now, some useful extensions…

1. BarTab

Tabs is a most valuable feature in all new browsers, yet it contributes to the high memory consumption in Firefox. Try to load 10 – 20 tabs and you see your system coming to a stand still. BarTab works by loading only the tabs that you are actively using. When a tab has been idle for a period of time, it will be automatically unloaded to free up memory space. The concept is, you pay (memory space) only what you are using.

When you restore a session with multiple tabs, you can also configure BarTab not to load all the tabs. The tab will only be loaded when it become active.

2. Memory Fox (Windows only)

Memory Fox is a great extension that can provide dynamic ram memory recover and will attempt to reduce and provide retention as an application’s resource demand. It is a Windows only extension.

3. Load Tabs Progressively

Conceptually similar to BarTab, but functionally different, Load Tabs Progressively limits the number of tabs that can load concurrently. That means, when you restore a session of 20 tabs, only 3 tabs (or other number that you have configured in the Settings) will be loaded concurrently. Once the 3 tabs finished loading, the next 3 tabs will be loaded.

Unlike BarTab, LTP will load all the tabs, so this is useful for those who need all their tabs loaded when they open Firefox, but doesn’t want it to slow down the system.

Note: It seems that the Load Tabs Progressively extension does not play well with the NoScript extension. Be warned.

And some configuration tips that might save the day…

1. Reduce session history

browser.sessionhistory.max_entries determines the maximum number of pages in the browser’s session history, i.e. the maximum number of URLs you can traverse purely through the Back/Forward buttons. The Default value is 50. We usually won’t surf more than 5 of the websites we previously surfed before, and there is really no need to store more than that in the session which can clog up memory as they grow.

1. Open Firefox
2. Type about:config in the Firefox address bar
3. Press CTRL-F and search for browser.sessionhistory.max_entries
4. Double click on the value 50 (or whatever value is there currently) and change it to something lower such as 5.
5. Restart Firefox.

You can also look at another configuration variable browser. sessionhistory. max_total_viewers which also determines the maximum number of content viewers to cache for “bfcache” (fast back/forward navigation). Default value is -1 (calculate based on available memory).
Set it to 0 so that no pages will be stored in memory.
Set it to a number such as 5 to store only 5 pages in memory.
More info here

2. Reduce memory usage when minimize

1. Start up Firefox
2. Type in about:config in the address bar and hit Enter
3. Right click and choose New > Boolean
4. Type config.trim_on_minimize in the pop-up box and hit Enter
5. Select True and hit Enter.
6. Restart Firefox

3. Fixed cache capacity OR Disable Cache Totally

Every time new page is loaded, Firefox will cache the page so it doesn’t need to load again to be redisplayed. By default, this setting is set to -1 for browser.cache.memory.capacity and to a number you specified in Tools -> Options -> Advanced -> Network / Cache for browser.cache.disk.capacity

How  to fix your cache to a certain value

Note: browser.cache.memory.enable and browser.cache.disk.enable needs to be True for this to work

1. Start up Firefox
2. Type about:config in the address bar and hit Enter
3. Search for browser.cache.memory.capacity and set a number in KB to use for the memory cache (ie. 1024KB = 1MB).
4. Search for browser.cache.disk.capacity and set a number in KB to use for the disk cache (ie. 1024KB = 1MB).

How to Disable the cache Totally

Set both browser.cache.memory.capacity and browser.cache.disk.capacity to 0.
Alternatively, you can also set browser.cache.disk.enable and browser.cache.memory.enable to False.

4. Use less extension and themes

This is really a no brainer. Uninstall all Firefox extensions and themes that you don’t use as they can cause Firefox to use more RAM. If you think that you might still need the extension in future but not using it currently, at least there’s an option to Disable it. Use only extensions that you usually use to cut down memory usage.

Always upgrade your extensions and themes to the latest version as they may fix the some problems leading to memory leaks. Firefox makes this quit easy as it now does the checking for you.

Lastly

And last but not least…there is a windows application called Firemin (formerly known as Firefox Plumber). The product page for the product says that is ‘babysits’ Firefox by sitting idly in the background and managing Firefox’s memory. Please note that this is not as extension of Firefox, but a windows application, that will sit in your system tray and just help manage Firefox’s memory.

So, do you have any more suggestion on how to fix the memory leaks in Firefox? Do comment them below here. We all will really appreciate it.

Share

1 comment

  1. i will try the suggestions you have given. just got the reason why my system keeps on hanging everytime i run multiple tabs on firefox.thank you for the advise.

Leave a Reply