Tip: Reduce Firefox Memory Usage
Many Firefox users notice that the open source browser can take a lot of memory, sometimes several hundreds of mega bytes. Fortunately Firefox lets you control to some extent how much memory it will consume.
To set the configurations you’ll need to edit Firefox settings. To do that you’ll need to type about:config in the address bar and edit the keys we’ll discuss in this article.
Cached Pages
When a page is loaded, it can be cached so it doesn’t need to be rerendered to be redisplayed. As a default Firefox will set the amount of cache memory according to the total amount of RAM your system got. The problem with that is that these values are per tab, so the more tabs you’ve got opened the more memory Firefox cache takes.
The config parameter is browser.cache.memory.capacity and you can set it to the number of KB you want let Firefox use for cache. Value of 0 will tell Firefox not to use any memory for cache. Note that the parameter browser.cache.memory.enable has to be true
The default value is -1 where Firefox will set the memory usage according to the following values
| Physical RAM | Memory Cache (in KB) |
|---|---|
| 32 MB | 2048 |
| 64 MB | 4096 |
| 128 MB | 8192 |
| 256 MB | 14336 |
| 512 MB | 22528 |
| 1 GB | 32768 |
| 2 GB | 45056 |
| 4 GB | 59392 |
In Firefox 2 these defaults will change to the following:
| Physical RAM | Memory Cache (in KB) |
|---|---|
| 32 MB | 2048 |
| 64 MB | 4096 |
| 128 MB | 6144 |
| 256 MB | 10240 |
| 512 MB | 14336 |
| 1 GB | 18432 |
| 2 GB | 24576 |
| 4 GB | 30720 |
To view current memory cache usage, type about:cache?device=memory in the address bar
Pages Stored In Memory
Pages that are visited are stored in memory in such a way that they don’t have to be re-parsed. Although it sounds like cache this is different from the cache. This setting improves performance of Firefox when pressing Back and Forward buttons.
The setting key to control this behavior is: browser.sessionhistory.max_total_viewers. The default value is -1 where Firefox use the following settings based on the amount of memory your system has.
| RAM | Pages |
|---|---|
| 32MB | 0 |
| 64MB | 1 |
| 128MB | 2 |
| 256MB | 3 |
| 512MB | 5 |
| 1GB | 8 |
| 2GB | 8 |
| 4GB | 8 |
This preference limits the maximum number of pages stored in memory. Setting the value to 0 do not store any pages in memory.
Let Windows claim back memory
On Windows operating systems, when a program is minimized and left for a period of time, Windows will reclaim the memory the program used in anticipation that other programs might need it. Because of the way Mozilla applications are stored in memory, Windows is much more aggressive in reclaiming the memory they use, which can cause a delay when the program is restored. This preference determines whether to allow Windows to reclaim memory from a minimized Mozilla application.
Firefox’s default setting prevents Windows from reclaiming memory when the program is minimized.
To change this settings you’ll need to change or create the key config.trim_on_minimize and set it to true or false. True - allows Windows to reclaim back the memory and false (default) prevents Windows from doing that.
Note: Changing Firefox’s settings may not be enough to stop it from taking too much memory, plugins can also be a big factor in memory consumption.
Tweet
|


(4 votes)
RSS Feeds 

October 24th, 2006 at 10:00 pm
כיצד לשלוט על צריכת הזיכרון של Firefox…
דפדפן פירפוקס עשוי לצרוך הרבה מ?ד זיכרון, במיוחד ?? ?ת? גולשי? ע? הרבה ט?בי? פתוחי?. הנה טיפ שיעזור לכ? לשלוט על כמות הזיכרון שפירפוקס צורך…
November 21st, 2006 at 7:14 am
Interesting article. Very helpful. Thx
December 5th, 2006 at 3:22 am
4 Tips on How to handle Firefox Memory Usage…
As we know, Firefox has problem with the memory usage. It makes the Firefox load slow, use too many resources and drag our computer down. Here are 5 tips on how you can use to handle and improve Firefox memory usage.
1. Reduce memory usage when minimiz…
January 2nd, 2007 at 8:38 pm
[…] Enquanto via uns quantos artigos, deparei-me com um artigo util até porque tinha mudado para o Opera por causa disto do Firefox: Reduce Firefox Memory Usage. Está em inglês. Se calhar já foi por aí falado há montes de tempo, lembro-me de alto do género das configurações, mas não sei se era deste browser e como até tava a precisar, eheh. Mesmo assim, habituei-me ao Opera, bem mais rápido. […]
January 8th, 2007 at 11:40 am
[…] The article on this page has some interesting tips for those who use Firefox to browse the web on how to reduce the Firefox memory usage. I’ve been using Firefox for quite some time now and I’m happy to see that Mozilla managed to solve most of the memory leaking problems that the previous versions had. So if you are not using Firefox 2 yet then this page is an absolute must to check out. If you are already using version 2 then you might still want to check it out because it has some interesting tips for all Firefox versions. And for those who use Internet Explorer to browse the internet… click here and download a browser that is much more configurable to your needs. […]
February 20th, 2007 at 1:20 pm
[…] Enquanto via uns quantos artigos, deparei-me com um artigo util até porque tinha mudado para o Opera por causa disto do Firefox: Reduce Firefox Memory Usage. Está em inglês. Se calhar já foi por aí falado há montes de tempo, lembro-me de alto do género das configurações, mas não sei se era deste browser e como até tava a precisar, eheh. Mesmo assim, habituei-me ao Opera, bem mais rápido. […]
July 14th, 2007 at 10:10 am
FireFox is the best browser anyway. If I have about 30 open windows, it takes about 250mb. It’ ok, and I have no problem with it.
August 15th, 2007 at 5:15 am
Very good article. Has cut down my average memory usage by about 40% which I am very pleased with.
After deleting some of my addons I managed to bring it down another 20%.
September 27th, 2007 at 3:23 am
Thanks
October 2nd, 2007 at 8:11 am
This doesn’t really help to reduce my Firefox 2 memory usage.
November 11th, 2007 at 6:16 am
THANKS
November 11th, 2007 at 10:11 am
thank you
November 29th, 2007 at 5:44 pm
i hardly use firefox because It often get hanged, I dont know why but after reading this article I will definitely try again.
December 31st, 2007 at 12:47 pm
FireFox is the best browser anyway. If I have about 30 open windows, it takes about 250mb. It’ ok, and I have no problem with it.
January 11th, 2008 at 10:32 am
As we know, Firefox has problem with the memory usage. It makes the Firefox load slow, use too many resources and drag our computer down.
January 11th, 2008 at 10:35 am
antrenman good works
February 3rd, 2008 at 8:40 am
thanks good info
February 9th, 2008 at 11:18 am
As we know, Firefox has problem with the memory usage. It makes the Firefox load slow, use too many resources and drag our computer downs
February 16th, 2008 at 9:10 am
thankss
March 1st, 2008 at 9:10 am
thankss so much
March 1st, 2008 at 4:24 pm
antrenman good works
March 2nd, 2008 at 7:55 am
thanks.
March 15th, 2008 at 5:14 pm
thanks very high work.