Thursday, March 19, 2009

How to fix the Firefox memory leak

Original at

http://internetducttape.com/2006/12/02/how-to-fix-the-firefox-memory-leak-firefox-hack/

Firefox memory leak? It doesn’t have one. Unfortunately, because of the way it’s configured to run out of the box it *looks* like it has one.

Follow these simple steps to get your Firefox memory usage under control.

These configuration changes are a trade-off between internet browsing speed and memory usage. They are most useful if you are multitasking and need Firefox to be less of a memory hog while using other applications.

#1: about:config

Type “about:config” into your address bar to access the hidden configuration options for Firefox.

firefox-memory-leak.png

#2: browser.cache.memory.capacity

Controls how much memory is used to cache pages.

Right click on the page and choose New then Integer and create an integer called browser.cache.memory.capacity and set it to a low number. This controls how many kilobytes of memory are used for the browser’s cache.

NOTE: number in screenshot is too small. Aim for 80% of whatever the default is.

firefox-memory-leak3.png

#3: browser.cache.disk.capacity

Controls how much disk space is used to cache pages in kilobytes.

Set browser.cache.disk.capacity to between 5000 or 15000.

128MB to 512M -> 5000.
512BM to 1GB of RAM -> use 15000

firefox-memory-leak6.png

#4: config.trim_on_minimize (optional)

Configure Firefox to swap memory to disk when minimized. This will make Firefox less responsive if you minimize/maximize a lot, but it is good if you need to free memory while multi-tasking to other applications.

Right click on the page and choose New then Boolean and create a boolean called config.trim_on_minimize and set it to true. Now when you minimize the window it will free up memory.

firefox-memory-leak4.png

#5: network.prefetch-next

Network link prefetch will download all pages with the rel=”prefetch” tag. This uses up more memory than you would otherwise think.

Set network.prefetch-next to false.

firefox-memory-leak2.png

#6: browser.sessionhistory.max_total_viewers

This controls how many pages of history are kept in the back/forward buttons. Lower the value to something acceptable. If you do not use back/forward often then you can set this very low.
Set browser.sessionhistory.max_total_viewers to a low number.

firefox-memory-leak5.png

10 comments:

JerryW said...

unfortunately none of the above is relevant to ff 3.08

Anonymous said...

Jerry, the latest version is FF 3.5.5
You should upgrade.

Anonymous said...

Can anyone recommend the well-priced IT automation software for a small IT service company like mine? Does anyone use Kaseya.com or GFI.com? How do they compare to these guys I found recently: N-able N-central desktop management
? What is your best take in cost vs performance among those three? I need a good advice please... Thanks in advance!

Anonymous said...

Thanks for posting this very helpful fix. I been looking for ways to reduce the memory on my FF browser for weeks and your advice was very helpful.

Once again, thanks.

Anonymous said...

I truly believe that we have reached the point where technology has become one with our lives, and I think it is safe to say that we have passed the point of no return in our relationship with technology.


I don't mean this in a bad way, of course! Ethical concerns aside... I just hope that as the price of memory decreases, the possibility of downloading our memories onto a digital medium becomes a true reality. It's a fantasy that I dream about almost every day.


(Posted on Nintendo DS running [url=http://www.leetboss.com/video-games/r4i-r4-sdhc-nintendo-ds]R4i SDHC[/url] DS BB)

Anonymous said...

I'm in a love/hate relationship with digital memory because of how prices are always,and I domean always dropping. I hate buying Micro SD Cards for my R4 / R4i at (what seems to be) a crazy bargain price only to see it become a whole lot cheaper a couple of weeks later.

(Posted by NewPost for R4i Nintendo DS.)

Anonymous said...

Genial post and this mail helped me alot in my college assignement. Gratefulness you as your information.

Anonymous said...

Sorry for my bad english. Thank you so much for your good post. Your post helped me in my college assignment, If you can provide me more details please email me.

Anonymous said...

thank you very much this helped a lot now if you can tell me where to go to see what is in my add delete file that can be deleted

Anonymous said...

I would like to read more on this site soon. By the way, pretty good design you have at that site, but what do you think about changing it once in a few months?