Firefox has a serious memory leak and IE11 uses least RAM & CPU in our test

Posted 18 January 2015 21:32 CET by Seán Byrne

Firefox has been my main browser over the past 10 years and apart from the odd performance issue, I seldom had any other issue with it. Usually after a year when it would start to slow down, I would wipe its profile to bring its performance to a like-new installation again.

Over the past few years, some of my friends started criticising its memory usage, particularly with multiple tabs open and a few have since moved to another browser. With 12GB of RAM in my PC, I never really noticed its RAM usage until I started checking the task manager. However, over the past few months, I started noticing another issue where when I left certain websites open in other tabs for more than 10 minutes such as those containing Flash ads, it would stutter, particularly when scrolling or typing in the browser.

So as a quick test, I opened up 10 tabs with flash-heavy websites, opened Task manager and monitored the Firefox process without touching the PC. To my surprise, Firefox’s memory usage started climbing and kept on going up, hitting 1GB in just 10 minutes. I began to wonder whether this was just a fault with Firefox or if other browsers did the same, so I decided to run the following experiment.

I started by installing Firefox Portable in a new folder so it runs with a clean profile and independent of the main Firefox installation. I then launched Internet Explorer, Opera, Chrome and Firefox Portable and opened Google.ie in the four browsers. I took memory readings of the browser processes and then opened the Donegal Daily website in the same single tab. Donegal Daily is my local community news website that has multiple Flash and animated ads, making it ideal for this test.

For the memory readings, I used the Windows Task Manager and sorted the processes by name to group processes together. As each browser uses multiple processes, I added up the values in the ‘Memory (Private working set)’ for the main processes of each browser. I did not include the Flash plug-in processes as it is unclear which browser is using which Flash process. On the other hand, no Flash process used more than 32MB throughout this test.

With the Donegal Daily website loaded in each browser and sitting idle for 2 minutes to ensure its content has fully loaded, I took another set of memory readings. I left the PC idle for 30 minutes and took screenshots of the task manager process listings to collect memory and CPU usage timings. Like with the memory readings, I added up the CPU usage readings of the main processes for each browser. Finally, I opened Google.ie in the four browsers, let them idle for 2 minutes and took one more set of memory readings.

The following are the results, with green and red highlighting the lowest and highest readings, respectively:

Web browser resource tests

When the browsers are launched, Opera and Chrome use quite a lot of RAM, nearly three times that of Internet Explorer. Firefox’s usage is 84MB which doesn’t seem as bad to start with. Internet Explorer is using just over 45MB.

With the Donegal Daily website opened in each browser and left to settle for about 2 minutes, the memory usage goes up dramatically with each browser using nearly 3 times the initial RAM usage. This is not really surprising considering that website homepage currently contains 12 advertisements, most of which are Flash based and animated.

After 30 minutes with this single tab left open in each browser, every browser used additional memory. Not only did Firefox use 6 times more memory while left untouched for 30 minutes, it used about 16.5 minutes of CPU usage! Chrome nearly doubled its memory usage and used about 6 minutes of CPU usage. Opera used just 80MB of additional memory and less than 5 minutes of CPU usage.

Internet Explorer which was once considered a resource hog clearly stands out now in this test using just 16MB more RAM than when the test started and about 3.5 minutes of CPU time. To rule out ads failing to load or the Flash plug-in crashing, I checked each browser and the Flash ads were still loaded and any animated ads still playing. It is also worth noting that the Firefox process usage was intermittently spiking to 1600MB at this point, while the other browsers had a fairly stable memory usage.

As a final memory leak test, I loaded up Google.ie in the same tab in each browser so that they were all displaying the same webpage when I took the initial memory readings. Firefox took about 5 seconds to respond to my keystrokes at this point, likely due to its heavy resource usage at this point. Surprisingly, all four browsers managed to recover most of their memory usage once left to settle for about a minute. Although Internet Explorer is using nearly double its initial RAM usage, it is clearly ahead of the other three, with Firefox using nearly 300MB with just the Google homepage open.

One thing that is pretty clear is that although the various browsers are competing on having the latest HTML5 and CSS3 standards and the fastest JavaScript performance, Internet Explorer is clearly well head of the others when it comes to the least RAM and CPU usage, at least in this particular test.


Related content


CDan
MyCE Resident
Posted on: 18 Jan 15 22:22
I'm not sure that using less RAM is necessarily always a good thing. RAM is meant to be used. I'm not saying the results of this test don't point to an issue, just that less is not necessarily better.  For example: what if IE is simply using the HDD instead?
-6 Agree

Seán
Senior Administrator & Reviewer
Posted on: 18 Jan 15 22:49
That's a good point. I took a look at the screenshots from the 30 minute period and it turned out I had the disk Read and Write activity and I/O Reads columns shown. Pity I didn't have the I/O Writes column also open.
  • Internet Explorer 11 - Read: 81.8MB - Wrote: 67.3MB - 33.1K I/O reads
  • Opera - Read: 288.6MB - Wrote: 281.7MB - 1930.8K I/O reads
  • Chrome - Read: 600MB - Wrote: 452.5MB - 1957.6K I/O reads
  • Firefox - Read: 64.4MB - Wrote: 41.7MB - 67.3K I/O reads

As for as disk activity goes, Internet Explorer 11 and Firefox both lead here, particularly with traditional hard disks. So those with slower hard disks such as in a laptop, but have plenty of RAM will probably find Opera and Chrome struggle more with hard disk usage, particularly while other hard disk activity such as a background full virus scan taking place.
1 Agree

CDan
MyCE Resident
Posted on: 19 Jan 15 04:27
So it seems more like differences in cache management, not entirely RAM usage per se. FF does allow you to override cache management. I can't say if that effects RAM usage or not.
0 Agree

ilnot1
MyCE Junior Member
Posted on: 19 Jan 15 05:39
Back when I was using a single core CPU, clocked at under 1 GHz, it made sense to police all non-essential processes to save CPU and RAM usage. But today, with a quad core/eight thread 4+ GHz machine I don't feel the need to do that any where near as voraciously since those extra few processes have a near zero, certainly imperceptible impact on my system. I feel like RAM usage is heading down that same road. Like CDan said RAM is there to be used. With 12, 16, and even 32 GB being installed nowadays RAM usage by an individual process is becoming less and less of a concern. While unwarranted memory usage isn't ideal, it is not really a problem until it negatively affects my computing.
-1 Agree

Caspy7
New Member
Posted on: 19 Jan 15 06:44
I have heard it seriously questioned before if we can rely on what IE is reporting as its memory usage because they can place parts of the browser outside of the IE processes (in the OS).
3 Agree

johnson876
TDMore Official Support
Posted on: 19 Jan 15 10:44
It seem IE performs better, but it cant support so many plugins as chrome and firfox. Firefox will take up more memory when you open the website with flash. when i open more than 10 firefox tabs, it will take about 2GB memory and the computer runs very slow.
2 Agree

Seán
Senior Administrator & Reviewer
Posted on: 19 Jan 15 17:49
For curiosity, I decided to leave Firefox sitting on the Donegal Daily website while at work just to see how high its memory usage would reach when I return home.

When I turned on my monitor, Firefox became an unresponsive white window with just the website title:

Attachment 294953

The following is the memory, CPU and disk usage readings just before I terminated its process:

Attachment 294952

After checking various websites, that Donegal Daily website is so far the worst I've come across for causing Firefox to gobble up RAM and CPU usage. I've often left Firefox with several tabs open and it still working when I return home, but usually having to restart Firefox due to it slowing down by that stage.
1 Agree

TSJnachos117
MyCE Resident
Posted on: 20 Jan 15 00:01
IHMO, if you really want to get a feel for the speed of these browsers, you should probably find a way to disable Flash Player in all of them. That way you can measure the memory the browser is using without measuring the memory Flash Player is using. Likewise for any other plugin.
1 Agree

coolcolors
MyCE Resident
Posted on: 20 Jan 15 00:35
Ok we test FF but install it in portable and not use it just plain install? That doesn't seem to really be a real measurement??

Quote:
I started by installing Firefox Portable in a new folder so it runs with a clean profile and independent of the main Firefox installation. I then launched Internet Explorer, Opera, Chrome and Firefox Portable and opened Google.ie in the four browsers.
Usually it would be as is install where all those browsers were install one to each computer computer or same computer and only one browser would test for one and then redo for each other browser to get a real world. And this without any plugins or flash or shockwave or silverlight or java installed to get a real performance of each browser and how it works. That would inform others how each browser by itself really performs.
0 Agree

MrScary
MyCE Senior Member
Posted on: 20 Jan 15 00:41
Personally I could not care less if IE was the Fastest in the World. I would NEVER use it..
-1 Agree

Caspy7
New Member
Posted on: 20 Jan 15 05:19
Thanks for your post.
Firefox devs are working currently on it.
The big problem with your example site seems to be related to JS compartments.
0 Agree

Seán
Senior Administrator & Reviewer
Posted on: 20 Jan 15 08:27
Quote:
Originally Posted by Caspy7
Firefox devs are working currently on it.
The big problem with your example site seems to be related to JS compartments.
Glad to hear the team is working on it. At least that website makes a good example to test whether the problem the problem is fixed.

For anyone curious on trying this experiment such as on their own system or in a clean installation they have handy - Just open the browser(s) they'd like to test on donegaldaily.com, take a note of the memory, CPU usage, etc. readings in Task Manager or whatever else they use for resource monitoring, then leave the PC untouched for 30 minutes and check the readings to see what changed.

Despite this issue, I am still using Firefox as my main browser.
0 Agree

Lophs2367
New Member
Posted on: 20 Jan 15 09:30
https://bugzilla.mozilla.org/show_bug.cgi?id=1123472

There is the bug report on it.  "So the ads are refreshed every 15 seconds... This ends up calling ...."  I noticed this also,  nothing like the 2 gigs after 2 minutes, I left by itself for 10 mins and the memory did go up around 500,000k.  So basically the website is doing something "silly", but that doesn't mean Firefox shouldn't be able to handle it.  Can't assume all webmasters are good net citizens, spamming their users with ads in 15 sec intervals or use efficient javascript. 

With that said, that site is probably one of the worst sites in terms on ads that I have I ever seen.  Not only ads per content ratio, but the refresh rate is beyond atrocious.  There is no reason for it and the webmaster should be ashamed. 
1 Agree

Seán
Senior Administrator & Reviewer
Posted on: 20 Jan 15 13:14
Besides the ads, they charge a subscription for those travelling or living abroad. Then again, a VPN connection back to my workplace does the trick when I'm on a holiday.

It's also fairly buggy on mobile devices as it intermittently brings up the "Log in / Buy a subscription" page when I access it on my Kindle Fire. My work colleague has the same issue with her iPhone. Despite contacting the site about this, they never replied.

As we recently announced Pale Moon which is based on Firefox and runs with a separate profile, I decided to install it and repeat this experiment to see how it compares:
  • At launch (google.ie opened): 78.5MB
  • donegaldaily.com opened: 314.5MB
  • 30 mins later (untouched): 1874.1MB
  • google.ie opened: 1016.7MB
  • Browser CPU usage (mm:ss): 8:02
  • Disk Read: 179.2MB
  • Disk Write: 188.8MB
  • Disk I/O Reads: 244.7K
  • Disk I/O Writes: 253.5K

Not only did Pale Moon use more RAM with Donegal Daily left open, it continued to use 3 times the RAM of Firefox when I went to Google.ie, not to mention it being barely responsive while trying to type the address to go back to Google. Its hard disk usage figures are also around three times higher than Firefox.
1 Agree

Spaarky
New Member
Posted on: 22 Mar 15 23:28
Comment from a newbie as a looooong time Firefox user.

My memory leak issues with Firefox seem to be related to specific web pages/sites.

AND, it does appear related to the amount of information on the web site, that ends up downloaded on ONE page.


My biggest problem is with "Aliexpress.com". Some of the pages will cause memory use in Firefox to jump from say 600 meg, to well over 2 GB of memory, in about 10 minutes. Or less. You can watch it steadily climb in Task Manager. In some cases, it climbs fast enough that it finally freezes the computer and I have to do a forced reboot. (If I catch it quick enough, I can do an "end task" on Firefox within Task Manager and stop it from killing the whole machine.

Also, when it does this, I can close every single window except for just a basic google search window, and the memory is NOT released. It's as if once the memory is used like this, it's stuck until you close Firefox completely, then restart it.

I'll try and bookmark the pages that it happens on and post a couple. It does not do it on every page. Only some of them.
1 Agree

Seán
Senior Administrator & Reviewer
Posted on: 22 Mar 15 23:57
Thanks for the update and welcome to Myce Spaarky. http://upload.cdfreaks.com/seanbyrne...y_shamrock.gif

When I get a chance, I'll try some tests with Aliexpress. If there are any specific pages on that site where the problem clearly shows up, feel free to post the links here or PM me and I'll try them here.
1 Agree

Seán
Senior Administrator & Reviewer
Posted on: 16 Apr 15 21:10
At first I thought I found another website that caused Firefox to leak memory severely, until I tried it in other browsers. Leave the page open for 2 to 3 minutes and chances are you'll have to kill the browser process:

For anyone interested in watching their RAM and CPU usage clock up, try loading the following page and scroll down a few times. I suggest muting the audio as it's got a crazy number of auto-playing video ads.

http://www.androidheadlines.com/2014...anogenmod.html
0 Agree

Reactions closed

Sorry, you can't comment on this item anymore. It's either too old or comments are disabled for this post.