HOWTO: Minimize Firefox's memory use


Recommended Posts

First of all, the master document is here:

http://plugindoc.mozdev.org/faqs/memusage.html

These changes should only be done if you have considerably more than 256MB of RAM otherwise it could actually increase your Firefox memory usage

Here is a summary:

The more memory you have, the more memory Firefox uses. It does this to improve performance. If you would rather leave more memory to other applications then consider these steps.

1. In the navigation bar type "about:config" (without the quotes) and press enter.

2. Right click to select New -> Integer and give it the name "browser.cache.memory.capacity" and set a value of "8192".

2. Right click to select New -> Boolean and give it the name "config.trim_on_minimize" and set a value of "true" (this step will only work only Windows-based computers)

3. Right click to select New -> Integer and give it the name "browser.sessionhistory.max_total_viewers" and set a value of "3'.

Make sure your extensions are up to date (older extensions are more likely to have memory leaks).

Try to minimize your extensions (the lighter the better).

If you do use FasterFox then do not enable pre-fetching.

Consider using NoScript to selectively block Javascript (this can reduce memory usage).

Remember that people can run FireFox on systems with very little RAM (I used to run it on an XP system that had only 128MB RAM) so it doesn't need to take hundreds of megabytes.

All of these suggestions have been posted here before but I thought I would sum it all up in one thread.

(Firefox was using 40MB of RAM with three tabs open when I wrote this and it minimized to less than 8MB of RAM)

Link to comment
Share on other sites

Why would you want to do this and what are the benefits???

After these changes...

Using the back/next buttons might be a bit slower. Browsing in general might be a bit slower. There may be a delay in minimizing or restoring Firefox.

But...

More memory is available to other applications. If you are the type of person to leave Neowin parked all day long then you might be using up memory that was better suited for Photoshop or something else.

Also...

The more memory you have the more you will notice these changes. On a 512MB system the difference may be slight but on a 2GB system then it would be more pronounced.

Link to comment
Share on other sites

Yeah people need to realize there will be a performance hit with something like this. I don't use any of these settings. I much prefer to simply close Fx every now and then and re-open it when I need it.

Link to comment
Share on other sites

I added a bold warning to the first post to warn people with 128MB RAM not to implement these changes and even people with 256MB might as well leave things at the default settings (except that, if they run Windows, they could implement the second step).

Steps 1 and 3 tell Firefox that, rather the determining the cache sizes based on the computer's total system memory, it should set the caches to amounts that would otherwise match a system that only had 256MB RAM.

To return to the default settings, locate the strings in the about:config screen, right click on them, choose "Reset" and then quit and reload Firefox.

Link to comment
Share on other sites

  • 7 months later...
right now my firefox is using: 178MB RAM :( is terrible

Why mozilla don't fix the problem?

Huh..right now Firefox is using about 44mb for me. I haven't done a thing about tweaking the mem usage either. Ive had it open for a while too. Ill watch it for another hour and see if it climbs.

Link to comment
Share on other sites

Mines using 110MB, still have 48% of my ram wasted though.

And Firefox handles memory oddly, it likes to take alot and release it when needed (kinda like .NET app's), that isn't a flaw, it's just different.

Link to comment
Share on other sites

And Firefox handles memory oddly, it likes to take alot and release it when needed (kinda like .NET app's), that isn't a flaw, it's just different.

The more memory you have, the more memory it uses. It expands to fill the space. The official line is that this is done for performance reasons. Personally, I don't often use the back button to go back 15 pages but maybe others do...

Link to comment
Share on other sites

The more memory you have, the more memory it uses. It expands to fill the space. The official line is that this is done for performance reasons. Personally, I don't often use the back button to go back 15 pages but maybe others do...

Overall performance or Firefox performance?.... I can't do anything else with Firefox running, but yea, I guess Firefox runs good.

Link to comment
Share on other sites

Overall performance or Firefox performance?.... I can't do anything else with Firefox running, but yea, I guess Firefox runs good.

Firefox performance. It optimized itself so things like using the forward and back buttons work without delay. Personally, I'd only need to jump back one or two pages with any assisted speed. If I wanted to go back 5 or 10 pages then I would tolerate a delay.

Some of the changes in this thread stop Firefox from optimizing the back/next buttons to such a large degree. If I recall correctly, that is what "browser.sessionhistory.max_total_viewers" does.

Link to comment
Share on other sites

Well, it's faster to re-use memory you already own, than constantly ask the OS for new memory.

That and Firefox (well, Gecko) does it's own memory management.

One thing i find, is that Firefox is horribly slow after it free's all the memory (e.g. trim_on_minimize, it's the reason it's disabled) i get it after i play games, Windows asks for the memory, Firefox frees it, after i finish the game and go back to firefox it can take 5-10 seconds to even show the window again.

Link to comment
Share on other sites

Well, it's faster to re-use memory you already own, than constantly ask the OS for new memory.

That and Firefox (well, Gecko) does it's own memory management.

One thing i find, is that Firefox is horribly slow after it free's all the memory (e.g. trim_on_minimize, it's the reason it's disabled) i get it after i play games, Windows asks for the memory, Firefox frees it, after i finish the game and go back to firefox it can take 5-10 seconds to even show the window again.

True but closing it and reloading your tabs might take as long. Presumably you'd minimize it when you were done with it for a while.

Link to comment
Share on other sites

I see what you guys are talking about now. FF my mem usage climbed into the territory you are talking about. I never really noticed this before and the first thing I want to do when I see FF using more than 100 mb is stop that from happening, but then I think, 'what good is it to have a couple gigs or memory when 75% of it isnt even being used?' I really notice that in Vista as its so friggin responsive even with an absolute ton of crap going on in the background. I definitely want my mem to be used, but in a smart way and it seems that its really starting to happen.

Link to comment
Share on other sites

eh.. nothing has changed for me.. i'm still up there at 100 MB's with 4 tabs..

edit:

hah.. minimize = 1mb... maximise and it slowly climbs back up to 100.

Edited by venezian
Link to comment
Share on other sites

right now my firefox is using: 178MB RAM :( is terrible

Why mozilla don't fix the problem?

Mozilla says it's a feature. The extra memory usage is supposed to make going forward and backward faster, among other things.

Link to comment
Share on other sites

I personally don't have memory issues. However, many others do. And saying that the extra memory is needed for fast forward/back is quite a pathetic excuse. How come Opera has this feature but doesn't consume as much memory? Anyways, I'm waiting for Fx3 and the cycle collector, apparently it will handle memory better.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.