Dot Net Perls

Firefox 3 Memory Benchmarks and Comparison

by Sam Allen - Updated June 20, 2009
Browsers

Problem. You are wondering about the memory usage of web browsers. Many people load hundreds of web pages, often over periods of 3+ hours, and complain about the memory usage of Firefox, Safari, or Internet Explorer. Traditional benchmarks do not look at all the things you might do with a program, and we need real-world numbers over a period of hours.

Solution. I developed a Windows Forms application in .NET called Memory Watcher that "watches" the system memory numbers. It uses a timer to poll the processes every 3 seconds. It then records every number, which allows us to keep track of each program's memory usage over time and with real-world usage. I collected over 1 million data points over 14+ hours.

1. Browser memory profiles

These results are from opening Memory Watcher and then using the browser between 9,000 and 11,000 seconds—close to 3 hours. Each browser is tested in a separate session, and there are brief periods of inactivity throughout the time period. The vertical axis is the memory used in MB, and the horizontal axis contains the memory "checkpoints" my program took (one every 3 seconds).

Browser benchmark graph

2. Benchmark details

The above profiles are not a direct comparison in any way, but they offer a visualization of trending in the memory behavior of the layout engines and interfaces. This is not a diagnosis or bug report. Let me show some important metrics of the above results.

Browser nameExact versionTime active (s)
Hours
Comments
Safari3.1.210,470 s
2.91 hours
Normal browsing
Firefox3.09,681 s
2.69 hours
Normal browsing
No extensions
Flock1.2.210,146 s
2.82 hours
Flock is based on Firefox 2.0
No extensions other than the default
Opera9.59,855 s
2.74 hours
No extensions
Only browser was used
IE8.010,236 s
2.84 hours
Used 7.0 rendering mode
No extensions

The system is Windows Vista SP1, and the computer has 3.0+ GB of RAM. No plugins are disabled, but the Acrobat Reader and Java plugins were (presumably) not used. Flock is based on Firefox 2.0 but its memory usage is probably worse because it uses built-in extensions.

3. Final memory measurements

The data in this article are those reported by Windows Vista, but the exact individual numbers should not be compared to each other. Some browsers were tested slightly longer than others, and some different pages were loaded. That said, here are the final performance metrics.

Browser nameEnding private set in MB
Safari636.9
Firefox 3111.8
Flock (Firefox 2)191.9
Opera 9.5190.6
Internet Explorer194.4
Measuring browser memory usage

4. About the "Memory Watcher"

Memory Watcher is a small program I wrote that records the memory usage of each process on the system every three seconds. It uses the PrivateMemorySize64 long value from the Process collection in .NET.

5. Updates—June 2009

Here we note that a second iteration of this article was published on June 20, 2009, featuring Google Chrome 3.0 developer channel release, Firefox 3.5 RC, Opera 10b, and Safari 4.0 final. The results in this new benchmark have similar results to this study, with Firefox's new version maintaining excellent memory efficiency. [Chrome and Firefox 3.5 Memory Usage - dotnetperls.com]

6 Conclusion

These profiles are meant to provide a picture of what the memory behavior of popular browsers is over a period of time, not to provide absolute benchmark times. Firefox 3.0 shows memory usage that is significantly lower than Firefox 2, which also does very well. Here is a summary of my results.

Final thoughts. After browsing for 14 hours with these programs, and recording all the results into spreadsheets, the most memory efficient browser in my usage is very clear—Firefox 3.0 not only trumps its older version, but every other popular offering on Windows. This article may help other vendors rethink their marketing campaigns, and may prompt further improvements.

Dot Net Perls
Internet | Back Button Use | Chrome and Firefox 3.5 Memory... | iPhone Web App Example Code | Page_Load Event and AJAX | whitehouse.gov Website Code
C# | Reflection Field Example | Validate Characters in String | Main Args Examples | Enum String Method
© 2009 Sam Allen. All rights reserved.