Firefox 64-bit for Windows can take advantage of more memory

By default, on Windows, Firefox is a 32-bit application. This means that it is limited to using at most 4 GiB of memory, even on machines that have more than 4 GiB of physical memory (RAM). In fact, depending on the OS configuration, the limit may be as low as 2 GiB.

Now, 2–4 GiB might sound like a lot of memory, but it’s not that unusual for power users to use that much. This includes:

  • users with many (dozens or even hundreds) of tabs open;
  • users with many (dozens) of extensions;
  • users of memory-hungry web sites and web apps; and
  • users who do all of the above!

Furthermore, in practice it’s not possible to totally fill up this available space because fragmentation inevitably occurs. For example, Firefox might need to make a 10 MiB allocation and there might be more than 10 MiB of unused memory, but if that available memory is divided into many pieces all of which are smaller than 10 MiB, then the allocation will fail.

When an allocation does fail, Firefox can sometimes handle it gracefully. But often this isn’t possible, in which case Firefox will abort. Although this is a controlled abort, the effect for the user is basically identical to an uncontrolled crash, and they’ll have to restart Firefox. A significant fraction of Firefox crashes/aborts are due to this problem, known as address space exhaustion.

Fortunately, there is a solution to this problem available to anyone using a 64-bit version of Windows: use a 64-bit version of Firefox. Now, 64-bit applications typically use more memory than 32-bit applications. This is because pointers, a common data type, are twice as big; a rough estimate for 64-bit Firefox is that it might use 25% more memory. However, 64-bit applications also have a much larger address space, which means they can access vast amounts of physical memory, and address space exhaustion is all but impossible. (In this way, switching from a 32-bit version of an application to a 64-bit version is the closest you can get to downloading more RAM!)

Therefore, if you have a machine with 4 GiB or less of RAM, switching to 64-bit Firefox probably won’t help. But if you have 8 GiB or more, switching to 64-bit Firefox probably will help the memory usage situation.

Official 64-bit versions of Firefox have been available since December 2015. If the above discussion has interested you, please try them out. But note the following caveats.

  • Flash and Silverlight are the only supported 64-bit plugins.
  • There are some Flash content regressions due to our NPAPI sandbox (for content that uses advanced features like GPU acceleration or microphone APIs).

On the flip side, as well as avoiding address space exhaustion problems, a security feature known as ASLR works much better in 64-bit applications than in 32-bit applications, so 64-bit Firefox will be slightly more secure.

Work is being ongoing to fix or minimize the mentioned caveats, and it is expected that 64-bit Firefox will be rolled out in increasing numbers in the not-too-distant future.

UPDATE: Chris Peterson gave me the following measurements about daily active users on Windows.

  • 66.0% are running 32-bit Firefox on 64-bit Windows. These users could switch to a 64-bit Firefox.
  • 32.3% are running 32-bit Firefox on 32-bit Windows. These users cannot switch to a 64-bit Firefox.
  • 1.7% are running 64-bit Firefox already.

UPDATE 2: Also from Chris Peterson, here are links to 64-bit builds for all the channels:

16 Responses to Firefox 64-bit for Windows can take advantage of more memory

  1. Gerd Neumann

    How can I see if I’m 32 or 64bit Firefox? Under “Help” > “About Firefox” it only says Firefox 47.1

    I guess there will be an automatic upgrade routine for all those legacy users (the 66%), because I would prefer that this just happens automatically. I do not want to be bothered with such stuff 😉

    Would you like that users switch to 64bit now, so you have a better testing basis? Then I’d do it. But would that mean I’m loosing my personal (profile) data? A “migrate to 64bit” button that takes care of everything would be nice until there’s an invisible background process for this…

    • If you look in Windows’ task manager (assuming you’re on 64-bit Windows), 64-bit Firefox should just be listed in the Details tab as “Firefox”, while 32-bit Firefox should show as “Firefox (x86)”.
      I believe Help – Troubleshooting information inside Firefox may also show it, but I’m not at my computer to verify.

      • Sorry, that Task Manager information is inaccurate, at least for me on Windows 10:
        You need to look in the “processes” tab. 64 bit Firefox will show as “Firefox”. 32 bit Firefox will show as “Firefox (32 bit)”.

    • Not the author, but have some information. 🙂

      If you did not go out of your way to install the 64 bit version, then you are running 32 bit.

      Another way to check is to look at your User Agent string. An easy way to do this is to click the Troubleshooting Information item under the Help menu. In the Application Basics section at the top, the 6th line (or so) down is the User Agent line. If that line contains “Win64” it is a 64 bit build. If that line *does not* contain that string it is not a 64 bit build.
      Also, if that line contains WOW64, it is a 32 bit build. (Why? Because Microsoft is just the worst.)

      Additionally, there’s no need for any data loss with using the 64 bit build. It uses the same data profile as the 32 bit build. You can install on top of the 32bit Firefox or in a different place. But if you start up the 64bit executable it will access the same profile as before.

  2. Can you explain the performance degradation that occurs when 64-bit Firefox Nightly (which I’ve used and tested for years as my primary browser) hits >2GB in RAM usage on a machine with 24GB-32GB total RAM? I have other apps on this PC that regularly use 6, 8, sometimes 12GB of RAM with no performance degradation.

    • Nicholas Nethercote

      I cannot explain it. If you can file a bug at bugzilla.mozilla.org with details and steps to reproduce (if possible) that would be helpful. Thank you.

  3. Gerd Neumann

    Interesting that when you’re running the Developer Edition (as I do), then it is 32 bit too by default. I would have thought, that this, would default to 64 bit at least. But it’s 32 bit… https://www.mozilla.org/en-US/firefox/developer/

  4. What’s the story with extensions? The last time I upgraded to 64-bit, I had to downgrade because some of the extensions I was using were not compatible with the 64-bit version.

    Is there somewhere you can check to see which extensions are compatible before you do an upgrade?

    • Add-ons should all be compatible. If you’re talking about NPAPI extensions (plug-ins), then they’re all blocked, except Flash and Silverlight.

  5. I like to use Firefox beta channel. Is there a place to download 64bit of Fx beta?

  6. Daniel Neely

    “it is expected that 64-bit Firefox will be rolled out in increasing numbers in the not-too-distant future.”

    From this I assume there’s a plan to start automatically upgrading people from FF32 to FF64. Is there a bug/wiki/etc tracking the effort?

    • Nicholas Nethercote

      Yes, the goal is to eventually start switching existing users, and also make 64-bit the default when appropriate for new users. Here is the plan: https://wiki.mozilla.org/Firefox/win64

      • Ok, looks like this is going to be a fair way out with FF64 first appearing as an option in the standard installer next March (FF52); with making it the default and upgrading current users indeterminately far into the future afterward.

        I’ll probably be doing a manual update in the near future (it’s been on my procrastinate list for a while); I was hoping this announcement would let me keep slacking but have my cake too anyway.