I have firefox version 11.0 and am running ubuntu 11.10. Firefox takes upto 850MB RAM with only six or seven tabs opened and all the tabs loaded with light weight websites only. I wonder why would a browser consume so much memory. It keeps increasing its memory consumption over time. I have 3GB RAM and most of the times firefox consumes upto 30% of my memory. How do I fix this?

Why do you think Firefox is using 850MB, how do you measure memory usage? Why do you think this is a problem? Please elaborate.
–
jippieApr 14 '12 at 9:14

1

@jippie: I have an add-on called Memory Restart which shows the memory consumption of firefox and also I have noticed it in the system monitor. It is a problem for me because I am not able to load other applications.
–
VivekApr 14 '12 at 9:46

Try seeing if the leak happens in safe-mode. There are many poor add-ons that leak memory. Also, sometimes there are weird conflicts between add-ons that cause leaks.
–
Chan-Ho SuhApr 14 '12 at 9:59

What do you mean by 'I am not able to load other applications.'?
–
jippieApr 14 '12 at 10:12

1

You can also open about:memory?verbose in your Firefox address bar to see a detailed tree list of where your memory is being used... I'm not sure if this will help, but you might find that some sites aren't as light as they seem.
–
Chris GrangerApr 14 '12 at 11:22

3 Answers
3

Without specifying what you're doing exactly, it's hard to say this is an actual problem.

There's a common misconception that utilizing a lot of memory is bad. However, unused memory is a waste. It's like keeping a warehouse mostly empty because you think it's cleaner. By keeping as much as you can in memory, it saves having to go to disk and also reloading content needlessly. As long as the program is good about letting go of memory it doesn't absolutely require to other programs, it's not a problem.

If it's a memory leak on the other hand, that would be a big problem. You can check this by closing all your tabs except say a blank one. Then start loading other memory intensive programs. If you have another browser installed, like Chrome, start loading massive pages in it. If Firefox is still showing massive memory usage, then it's a leak. Your system will likely become sluggish from the other programs demanding unavailable memory.

It might be Firefox, but often it's an add-on or combination of add-ons causing the leak. You can disable all add-ons by starting Firefox in safe-mode from the terminal, firefox -safe-mode, to see if you have the same thing happen.

If you're saying that with just a few "light" websites open, and not doing anything in Firefox, that Firefox just starts taking up more and more memory, then it's plausible it's just Flash or some script going nuts. This is why I put "light" in quotes. It's unbelievable how badly some simple-looking sites are designed.

I tried running firefox in safe mode and so far it is consuming very less memory, around 3.4%. The only reason why I use firefox is firebug. But I think firebug is the one that causes memory leak. So is there any workaround for this?
–
VivekApr 14 '12 at 10:13

You can try RAMBack. I tried it not too long ago and it did seem to help (eventually I was able to fix my own leak problem so I didn't need it anymore). It adds a clear (RAM) cache menu option to Tools. You seem to be up on technology, so I assume you have the latest updates. Only other thing I can think of is that from a brief Google search, it seems people have been complaining a long time about Firebug memory usage. I'd look in and ask in Firebug related forums and mailing lists about this.
–
Chan-Ho SuhApr 14 '12 at 10:27