10/22/2006

Tip: Reduce Firefox Memory Usage

Filed under: — By Aviran Mordo @ 4:22 pm

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.



Digg this story ?

 

23 Responses to “Tip: Reduce Firefox Memory Usage”

  1. שווה קרי?ה Says:

    כיצד לשלוט על צריכת הזיכרון של Firefox…

    דפדפן פירפוקס עשוי לצרוך הרבה מ?ד זיכרון, במיוחד ?? ?ת? גולשי? ע? הרבה ט?בי? פתוחי?. הנה טיפ שיעזור לכ? לשלוט על כמות הזיכרון שפירפוקס צורך…

  2. ustoopia Says:

    Interesting article. Very helpful. Thx

  3. CypherHackz.Net Says:

    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…

  4. MARGARIDA.NET - Private Emotion » Blog Archive » Reduzir memória utilizada do Firefox Says:

    […] 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. […]

  5. ustoopia » Reduce Firefox Memory Usage Says:

    […] 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. […]

  6. Margarida.net [v.62] - Blog, portfolio e tutoriais [pt] Blog Archive : Reduzir memória utilizada do Firefox Says:

    […] 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. […]

  7. Artem Says:

    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.

  8. Robert Baker Says:

    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%.

  9. www.r10.net küresel ısınmaya hayır seo yarışması Says:

    Thanks

  10. Symbian Says:

    This doesn’t really help to reduce my Firefox 2 memory usage.

  11. youtube video Says:

    THANKS

  12. santé Says:

    thank you

  13. egon Says:

    i hardly use firefox because It often get hanged, I dont know why but after reading this article I will definitely try again.

  14. www.r10.net küresel ısınmaya hayır seo yarışması Says:

    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.

  15. ssk Says:

    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.

  16. antrenman Says:

    antrenman good works

  17. Kurtlar vadisi pusu Says:

    thanks good info

  18. ilahi Says:

    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

  19. olive Says:

    thankss

  20. ilahiler Says:

    thankss so much

  21. iyinet webmaster forumu 2008 seo yarışması Says:

    antrenman good works

  22. Recep İvedik Says:

    thanks.

  23. seyfi Says:

    thanks very high work.

Powered by WordPress