Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article

Skip to comments.

Fixing Firefox's memory leak (January, 2005)

Posted on 01/24/2005 3:04:40 PM PST by Terpfen

I noticed a few Firefox threads here have people complaining about how much memory Firefox takes up. This is a known memory leak, and the Mozilla guys haven't gotten around to fixing it for whatever reason. But there's no reason your Firefox should take up 70,000K in memory, so here's how to fix that memory leak and keep Firefox from bloating up.

1. Open a new tab. Type "about:config" without quotes into the address bar and hit enter/click Go.

2. Right-click anywhere, select New, then Integer. In the dialog prompt that appears, type:

browser.cache.memory.capacity

3. Click OK. Another dialog prompt will appear. This is where you decide how much memory to allocate to Firefox. This depends on how much RAM your computer has, but generally you don't want to allocate too little (under 8MB), but if you allocate too much, you might as well not do this. A good recommended setting is 16MB. If you want 16MB, enter this value into the dialog prompt:

16384

(Why 16384 instead of 16000? Because computers use base-12 counting. Thus 16 megabytes = 16384 bytes. Likewise, if you want to double that and allocate 32MB, you'd enter 32768.)

4. Click OK to close the dialog box, then close all instances of Firefox and restart. If your Firefox still uses the same amount of memory, give it a few minutes and it should slowly clear up. If that fails, try a system reboot.

Hope I did a service to some FReepers today.


TOPICS: Computers/Internet; Miscellaneous
KEYWORDS: browser; firefox; mozilla
Navigation: use the links below to view more comments.
first 1-5051-56 next last

1 posted on 01/24/2005 3:04:43 PM PST by Terpfen
[ Post Reply | Private Reply | View Replies]

To: Terpfen

Most helpful. Thanks.


2 posted on 01/24/2005 3:07:08 PM PST by My2Cents ("I look to two things: First to God and then to Fox News.")
[ Post Reply | Private Reply | To 1 | View Replies]

To: Terpfen

Thanks!


3 posted on 01/24/2005 3:11:01 PM PST by Tarpaulin (Look it up.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Terpfen

>>>>Because computers use base-12 counting.

No, computers use binary.


4 posted on 01/24/2005 3:18:37 PM PST by Keith in Iowa (Common Sense is an Oxymoron)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Keith in Iowa

Yeah, but memory allocation is still done in base-12, and that's what this thread's about.


5 posted on 01/24/2005 3:28:51 PM PST by Terpfen (Gore/Sharpton '08: it's Al-right!)
[ Post Reply | Private Reply | To 4 | View Replies]

To: Terpfen

What exactly do you mean?


6 posted on 01/24/2005 3:37:16 PM PST by John0309
[ Post Reply | Private Reply | To 1 | View Replies]

To: John0309

What do you mean by what do I mean? *confused*


7 posted on 01/24/2005 3:39:10 PM PST by Terpfen (Gore/Sharpton '08: it's Al-right!)
[ Post Reply | Private Reply | To 6 | View Replies]

To: Terpfen
Everything in computers is base 2 - binary. It's all based on bits & bytes & powers of 2... 8 bits to a byte...
2^8    2^7	2^6	2^5	2^4	2^3	2^2	2^1
256    128	64	32	16	8	4	2

thus - 1MB = 1024 bytes = 2^10 and so on...

8 posted on 01/24/2005 3:45:40 PM PST by Keith in Iowa (Common Sense is an Oxymoron)
[ Post Reply | Private Reply | To 5 | View Replies]

To: Keith in Iowa

Odd, I was always under the impression that allocation uses base-12.

Ah well, thanks for the correction.


9 posted on 01/24/2005 3:53:45 PM PST by Terpfen (Gore/Sharpton '08: it's Al-right!)
[ Post Reply | Private Reply | To 8 | View Replies]

To: Terpfen


Sorry Terpfen, he is right. It's all based on binary. That is why on and off are represented on power keys with zero and one ( 0/1 ).


10 posted on 01/24/2005 3:55:11 PM PST by Riddick (<---------- Red state guy stuck in a barely blue state.)
[ Post Reply | Private Reply | To 5 | View Replies]

To: Terpfen

You might be thinking of hexadecimal... which is base 16.


11 posted on 01/24/2005 3:59:04 PM PST by ken in texas
[ Post Reply | Private Reply | To 9 | View Replies]

To: Terpfen

I'll try it, see if it makes what's good better!


12 posted on 01/24/2005 4:52:31 PM PST by Solamente
[ Post Reply | Private Reply | To 1 | View Replies]

To: Terpfen
Great input. Thank you for sharing.
As pointed out, elsewhere, 1k = 210 which is 1024 bytes X 16= 16384; same answer, different route...
13 posted on 01/24/2005 7:05:12 PM PST by Publius6961 (The most abundant things in the universe are hydrogen, ignorance and stupidity.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Terpfen

There are 10 kinds of people in the world - those who understand binary and those who don't.


14 posted on 01/24/2005 7:08:50 PM PST by Drango (To Serve Man.....IT'S A COOKBOOK!)
[ Post Reply | Private Reply | To 5 | View Replies]

To: Drango

There indeed are. (I know enough to get THAT joke.)


15 posted on 01/24/2005 7:09:42 PM PST by Terpfen (Gore/Sharpton '08: it's Al-right!)
[ Post Reply | Private Reply | To 14 | View Replies]

To: Terpfen

Doesn't hurt to give it a try, but I think all this is going to do is force Firefox to swap pages out to the page file. You may notice an increase in hard drive activity.


16 posted on 01/24/2005 7:12:13 PM PST by Doohickey ("This is a hard and dirty war, but when it's over, nothing will ever be too difficult again.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Terpfen

Firefox bump for later reference


17 posted on 01/24/2005 7:13:12 PM PST by Nowhere Man (We have enough youth, how about a Fountain of Smart?)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Terpfen

Is there a problem with Firefox using 70 megs when you have 256? I haven't noticed any performance issues.


18 posted on 01/24/2005 7:13:26 PM PST by ez (Let the tolerant tolerate my intolerance!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Doohickey

I've been using it for a while and don't hear or notice any additonal activity. YMMV, of course.


19 posted on 01/24/2005 7:14:24 PM PST by Terpfen (Gore/Sharpton '08: it's Al-right!)
[ Post Reply | Private Reply | To 16 | View Replies]

To: ez

Generally, it's bad whenever a program chews up more memory than it needs. 70 out of 256 is pretty damn disproportionate, IMO.


20 posted on 01/24/2005 7:16:21 PM PST by Terpfen (Gore/Sharpton '08: it's Al-right!)
[ Post Reply | Private Reply | To 18 | View Replies]

To: Terpfen

I'm gonna give a shot. The virtual memory size has been hanging out at about 120MB. I set my memory limit to 24576, and will check see if the paged memory goes up.


21 posted on 01/24/2005 7:22:04 PM PST by Doohickey ("This is a hard and dirty war, but when it's over, nothing will ever be too difficult again.)
[ Post Reply | Private Reply | To 19 | View Replies]

To: Keith in Iowa
Everything in computers is base 2 - binary. It's all based on bits & bytes & powers of 2... 8 bits to a byte...

I thought it was base 10 binary. (Of course, any base is base 10)

22 posted on 01/24/2005 11:32:49 PM PST by supercat (To call the Constitution a 'living document' is to call a moth-infested overcoat a 'living garment'.)
[ Post Reply | Private Reply | To 8 | View Replies]

To: Drango

Why do geeks confuse Christmas and Halloween?


23 posted on 01/24/2005 11:33:48 PM PST by supercat (To call the Constitution a 'living document' is to call a moth-infested overcoat a 'living garment'.)
[ Post Reply | Private Reply | To 14 | View Replies]

To: supercat

A: Because 31 OCT = 25 DEC


24 posted on 01/24/2005 11:35:58 PM PST by Drango (To Serve Man.....IT'S A COOKBOOK!)
[ Post Reply | Private Reply | To 23 | View Replies]

To: Terpfen

There is only browser.cache.memory.enable in my Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

I.e. no browser.cache.memory.capacity. Could someone advice?


25 posted on 02/22/2005 2:38:53 AM PST by avalez
[ Post Reply | Private Reply | To 1 | View Replies]

To: avalez

You have to create the value yourself. Read the step again--it's an instruction as to how to create that value.


26 posted on 02/22/2005 5:55:07 AM PST by Terpfen (New Democrat Party motto: les enfant terribles)
[ Post Reply | Private Reply | To 25 | View Replies]

To: Terpfen

Oops, sorry


27 posted on 02/22/2005 9:54:44 AM PST by avalez
[ Post Reply | Private Reply | To 26 | View Replies]

To: Terpfen
I'm disappointed, did I do/understand something wrong? I did everything as you said, set the cache to 32768. But, FF still leaks! Currently it's hogging >57 megs. And, it keeps getting larger as the night goes on.

Fortunately I have that session saver extension installed, so I frequently close and re-open Firefox. But that can be quite annoying, since I'm doing extensive research at the moment.

Any idea what could've gone wrong?
28 posted on 04/08/2005 5:08:32 PM PDT by addicted2h (ASUS L2D, AMD Athlon XP, W2K, 458,204 KB RAM)
[ Post Reply | Private Reply | To 1 | View Replies]

To: addicted2h

Not sure. Some people have the same problem. Maybe it's more of a "memory recommendation" than an actual limiter, which would make sense, especially if you have a lot of windows/tabs open constantly.

Word is Mozilla might have a fix ready for Firefox 1.1's release in June, but that's not set in stone.


29 posted on 04/08/2005 5:13:35 PM PDT by Terpfen (New Democrat Party motto: les enfant terribles)
[ Post Reply | Private Reply | To 28 | View Replies]

To: Terpfen

I created the new entry, did a reboot and FF is still using over 27 Meg...same as before the reboot. I think I'll play with some smaller integers and see what happens.


30 posted on 04/08/2005 5:36:52 PM PDT by Bloody Sam Roberts (Remember that great love and great achievements involve great risk)
[ Post Reply | Private Reply | To 1 | View Replies]

Comment #31 Removed by Moderator

To: verysick

Yes, the memory leak is still there. At the time of my posting this, these steps DID help to minimize and partially eliminate the memory leak. Changes to 1.5 make them less effective.

The best solution right now is to use config.trim_on_minimize.


32 posted on 12/22/2005 9:37:27 PM PST by Terpfen (Libby should hire Phoenix Wright.)
[ Post Reply | Private Reply | To 31 | View Replies]

To: Terpfen
The best solution right now is to use config.trim_on_minimize.

Another useful tweak is to change the browser.sessionhistory.max total viewers value from -1 to 0. It disables caching of previous pages, which slows down backspacing slightly with broadband but I've noticed quite a bit less memory being used.

33 posted on 02/18/2006 8:44:15 AM PST by Reaganwuzthebest
[ Post Reply | Private Reply | To 32 | View Replies]

Comment #34 Removed by Moderator

To: verysick
They definitely need to do some work on memory. In XP memory use averages between 38 and 40 mbs for me unless I use a WMP or Real Player plugin, then it shoots up to around 60+ and stays there since it doesn't give it back, even when you're done on the web page. To solve that little problem I installed the MediaPlayerConnectivity extension, which launches embedded audio and video in the external player.

Also I keep config.trim_on_minimize set to false but I do have browser.cache.memory.enable on false as well. That seems to have helped somewhat.

35 posted on 03/16/2006 2:32:23 PM PST by Reaganwuzthebest
[ Post Reply | Private Reply | To 34 | View Replies]

Comment #36 Removed by Moderator

To: verysick

It could be related to the extensions. Have you tried running it in safe mode for a while to see what kind of memory use you get?


37 posted on 03/27/2006 12:57:41 PM PST by Reaganwuzthebest
[ Post Reply | Private Reply | To 36 | View Replies]

To: Terpfen

I read someone's answer and tried it, the thing with the memory setting and the binary discussion. Well, it's true, it didn't work.

So, I decided, "Instead of being a lazy ass and looking for answers elsewhere, I'll simply go into the about:config and looked for myself."

Guess what? I got it right on the first shot out...

Here you go, THIS is what you need to change, VERY SIMPLE!

Find this line using the about:config in the URL = browser.cache.memory.enable

Click or double click on it so it reads: FALSE It should turn Bold also, to note the change.

I tried it, loaded up on as many pages as I could find and WHAMMO! Memory never exceeded my limits and dropped down to the 22k evertime a page would finally complete loading!!!

I now have about 10-20 forums to post this too because other people are still screaming about it.

Enjoy!


38 posted on 04/18/2006 5:07:40 PM PDT by Oahn Macleod (Thank me later)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Oahn Macleod

Is this issue still unsolved.. i am seeing mozilla still leaks!!


39 posted on 07/07/2006 12:32:43 AM PDT by FreeIndian
[ Post Reply | Private Reply | To 38 | View Replies]

To: Oahn Macleod

This caused some odd behaviour when I tried it on my 1.5.0.4 install. The home botton and various links in my bookmarks toolbar ceased to work, although there did seem to be an improvement. Don't know if anybody else had the same issue.


40 posted on 07/11/2006 1:34:22 AM PDT by pauliehaha
[ Post Reply | Private Reply | To 38 | View Replies]

To: Oahn Macleod
I should have my brains checked, but I have 69 extensions active and 44 just sitting there not being used. Sometimes I will activate or deactivate an extension when I want it's functionality. Right now I have 6 tabs open and FFv1.5.0.6 is hoggin appx 237MB but using only 2-17 CPU clicks.... Yes, I find it unstable, but I still like it better than IE....I think it's because I am a tweak-nut. Oh well.
41 posted on 09/07/2006 10:57:49 PM PDT by wpbdude1
[ Post Reply | Private Reply | To 38 | View Replies]

To: Terpfen

2005: "Hope I did a service to some FReepers today."

2006: and even a year later you helped some none FReepers. See

"I know on the current Firefox, you can take measures [freerepublic.com / http://www.freerepublic.com/focus/f-bloggers/1327586/posts] to restrict its size but I think it starts to thrash when I go to a largely intensive Flash site. "

From
Firefox 2.0 RC3 Released
http://slashdot.org/articles/06/10/17/1215241.shtml


42 posted on 11/01/2006 12:00:56 PM PST by bwteim (bwteim = begin with the end in mind)
[ Post Reply | Private Reply | To 1 | View Replies]

To: bwteim

Yeah, this article ranks pretty high on search engine results lists. I'm amazed. Thanks for the notice!


43 posted on 11/01/2006 7:34:17 PM PST by Terpfen (And in the second year, Nick Saban said "Let there be a franchise quarterback...")
[ Post Reply | Private Reply | To 42 | View Replies]

To: Terpfen

You're welcome. That about:config is handy to keep as reference and use. I am using 2.0 now, BTW. Had to remove some extensions at first.


44 posted on 11/02/2006 5:53:01 AM PST by bwteim (bwteim = begin with the end in mind)
[ Post Reply | Private Reply | To 43 | View Replies]

Comment #45 Removed by Moderator

To: smokes420

You're welcome.

And tell those same people that Firefox 3 is slated to fix a whole host of memory leaks, partially due to its codebase getting a fairly extensive reworking.


46 posted on 01/19/2007 5:31:04 PM PST by Terpfen (Got a problem? It's now Pelosi's fault!)
[ Post Reply | Private Reply | To 45 | View Replies]

To: Terpfen

I installed a free Freememory program. It seems to have helped. Also if click the "-" hide the page/browser button at the top right it refreshes FireFox.


47 posted on 02/11/2007 3:00:59 PM PST by RapierWit
[ Post Reply | Private Reply | To 1 | View Replies]

To: Terpfen

The Firefox memory issues may have little to do with Firefox itself, at least in some cases. I found the culprit was actually the popular Zone Alarm firewall on my PC. There is some sort of coexistence problem with Zone Alarm and p2p or tunneling applications that cause its memory usage to continually grow. For some reason, this growing memory usage also happens to Firefox. The solution for me was to remove Zone Alarm and repalce it with the free Comodo Firewall Pro. My memory issues with Firefox and the firewall are gone.


48 posted on 09/10/2007 6:38:38 AM PDT by itwonder
[ Post Reply | Private Reply | To 1 | View Replies]

To: itwonder

That’s a separate issue with Zone Alarm, which really isn’t as good as advertised. Sygate and Comodo are better software firewall options. (But it’s really in your best interest to get a hardware firewall.)

Firefox’s memory leaks are well-known, so it’s not a matter of Zone Alarm somehow interfering with Firefox. Luckily, the upcoming Firefox 3.0 fixes a good lot of them.


49 posted on 09/10/2007 7:34:48 AM PDT by Terpfen (It's your fault, not Pelosi's.)
[ Post Reply | Private Reply | To 48 | View Replies]

To: Terpfen

Another fix - boolean - config.trim_on_minimize - true


50 posted on 09/30/2007 1:29:56 PM PDT by narses (...the spirit of Trent is abroad once more.)
[ Post Reply | Private Reply | To 1 | View Replies]


Navigation: use the links below to view more comments.
first 1-5051-56 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson