Future Firefox will be multiprocess
Posted by Percy Cabello on May 6th, 2009 • Tags:
ShareThis

Mozilla has started a new project to make Firefox split into several processes at a time: one running the main user interface (chrome), and another or several others running the web content in each tab. Like Chrome or Internet Explorer 8 which have implemented this behavior to some degree, the main benefit would be the increase of stability: a single tab crash would not take down the whole session with it, as well as performance improvements in multiprocessor systems that are progressively becoming the norm.

The project, which lacks a catchy name like other Mozilla projects (like TaskFox, Ubiquity, or Chocolate Factory) is coordinated by long time Mozillian, Benjamin Smedberg; and also integrated by Joe Drew, Jason Duell, Ben Turner, and Boris Zbarsky in the core team.

According to the loose roadmap published, a simple implementation that works with a single tab (not sessions support, no secure connections, either on Linux or Windows, probably not even based on Firefox) should be reached around mid-July. Phase II will deal with the interactions between the two process types (chrome and content), and is aimed for November.

Phase III will take on adapting the APIs for extensibility, accessibility, and performance. By this time (not even guesstimated), we could see a release to play with. Finally, Phase IV will extend the previous development to support several content processes at a time. Security sandbxing will be covered in a later phase.

So it seems we won’t see a multiprocess Firefox for at least a year or so. However, some decisions like taking Chromium’s networking stack to replace Necko, could accelerate the process. As you may know, Chromium is the open source version of Google’s Chrome.

Another consideration is that changes would come at the platform level, so in reality, any Mozilla-based application would be able to create independent processes when web content rendering is required.

Comments
Nils said on May 6, 2009, 5:19 pm:

I think the whole “one tab one process”-thingy makes the taskmanager one hell of a mess. I work with 40-50 tabs at all time so imagine what my taskmanager’s gonna look like =/

I don’t see the real advantages of such a set up…

Reply

Eli Gundry replied on May 6th, 2009, 8:22 pm:

Your taskmanager being a mess vs. Making it nearly impossible for malware to get to your machine.

Hackers have come out and said that this sandboxing approach has made it nearly impossible to crack Chrome, and now other browsers want in on it. Also, the whole process makes the browser more stable. I can’t count how many times I’ve made the mistake of opening a PDF file in Firefox only to see it freeze and wait for it to respond minutes later. This would make my life so much easier.

WaruiKoohii replied on May 7th, 2009, 2:47 am:

The sandboxing in Chrome, IE7, and IE8 is unrelated to running each tab in separate processes. This specific project is unrelated to sandboxing.

Chrome, IE7, and IE8 all run their processes below the user privilege, so if malware compromises the browser, it can’t actually do anything.

Firefox currently, and even after this, will run at user privileged level, so if the browser is compromised, so is the user account.

That said, Mozilla is supposed to be implementing sandboxing in 4.0. We’ll see if that goes anywhere or not. I hope it does, it’s a basic security measure that Mozilla has ignored for far too long.

True Falcon replied on May 10th, 2009, 4:48 pm:

Re the pdf files – go to options/applications. enter pdf in the search box. change the action to ‘use Foxit Reader’. Now the pdfs will automatically download in the browser downloader and open outside in the reader. Problem solved.

Brian replied on May 10th, 2009, 12:45 pm:

Speed and security is the real advantage of having a multi-process web browser.

roirraW "edor" ehT said on May 7, 2009, 12:04 am:

That is a slight annoyance, Nils, however combined with the fact that at least Windows 7 (I think Vista too but I don’t remember) automatically sorts the processes in the Task Manager (in XP you had tell it to sort it), it shouldn’t be that big a deal to bypass all the Firefox processes. Do you really need to look at the processes in your Task Manager that often?

I concede that I usually end up doing so at least a couple times a day on average, if I know what I’m looking for then I have it sorted alphabetically (forward or reverse) and I skip everything I don’t need to look at anyway. Otherwise I’m usually looking for the process or processes which take up the most CPU % or RAM, in which case the multiple Firefox processes still wouldn’t present a problem.

Reply

Theory said on May 7, 2009, 12:07 am:

There shouldn’t be any more taskbar buttons than normal. Those are associated with top level windows, not processes.

Reply

NickF said on May 7, 2009, 4:10 am:

It’s called multi-process not multiprocessor… ;-)

Reply

Manish Sinha said on May 7, 2009, 9:07 am:

Flash also makes life a mess and in browsers like Firefox, one freeze takes down the browser.
I wish Firefox has this feature, since memory is quite cheap these days. Secondly, browser is an integral part of our Internet life.

Reply

daylight burns the eyes said on May 7, 2009, 9:36 am:

@Nils
I was the same way until a few weeks ago, I also had the same mindset about this idea but instead I started using the bookmarking system in Firefox more effectively and have now trimmed my normal 107-140 tabs down to about five or six. If you organize it right it can work out very well. Folders are your parents, and separators are your friends.

@Theory
You’re right, but I think he’s talking about the processes you see in your task manager, which for every tab you have open in the browser would show a new Firefox process.

Although that may bulk up your listing some you can still type out the first few letters of what you’re looking for (just click anywhere on an active process then type eg: word) and it should take you to that process in a jump. It makes finding a specific process much faster when you’re in a hurry.

Reply

[...] y para ello ha comenzado con un nuevo proyecto por ahora llamado Content Processes con la idea de que cada pestaña sea un proceso aparte y todos ellos sean controlados por un proceso central que controlaría la interfaz del [...]

Alex Bishop said on May 7, 2009, 5:39 pm:

Careful with the terminology here: Firefox already has multiprocessor support because it uses multiple threads; this project is about moving from a single processes to multiple processes.

Reply

Percy Cabello replied on May 10th, 2009, 11:47 pm:

Thanks Alex. That was a mistake I’ve just been able to correct. Sorry for any confusion this may have caused.

Neona said on May 7, 2009, 8:30 pm:

I would think so, but I don’t think i’ve /ever/ actually seen firefox tap more than one core, even when lagging under heavy load (loading 20+ tabs, for example). I always thought that was weird, so for some reason it must be confined to one core even though it is multithreaded. I hope this fixes that some, whatever the issue is.

The sandboxing is nice too, i dont like firefox freaking out because one page is somehow messing it up.

Reply

Daniel said on May 8, 2009, 1:41 am:

Alex is right here. Multiprocessing isn’t going to be directly improved by splitting into more prosesses, but it could lead to those processes being more “threaded” than Firefox is now.
I’m too a sloppy user with sessions of 50 tabs or so. They arent all flash and pdf, more like wikipedia and API-references. So is Firefox gonna start up 50 processes when I fire up one of those saved sessions?

Reply

Lennie said on May 8, 2009, 2:40 am:

@Nils You most be using the windows default taskmanager which doesn’t list parent/child relationships for processes. I think the problem here is the taskmanager.

Reply

Ben Werdmuller said on May 8, 2009, 4:35 am:

In my opinion this is where Mozilla need to be looking to improve the browser. All the new evolutionary features they’re looking into are fine, but ultimately a browser needs to be an almost-invisible, efficient way of getting to web content and applications. I’ve found myself moving to Chrome for day-to-day tasks, and it’s going to take massively-improved performance from a multi-process Firefox to get me to move back.

Reply

NuShrike said on May 8, 2009, 2:49 pm:

This is all about moving the responsibility for managing disparate sessions to the layer/experts whom know it best, the OS. It does reduce the ability to share memory and makes IPC more difficult, but that’s great security-wise.

Basically, exactly what Apache and PostgreSQL has ben doing for years.

Reply

[...] in the early phases and likely won’t be part of Firefox 3.5, but rather Firefox 3.6. From Mozilla Links: Mozilla has started a new project to make Firefox split in several processes at a time: one [...]

[...] in the early phases and likely won’t be part of Firefox 3.5, but rather Firefox 3.6. From Mozilla Links: Mozilla has started a new project to make Firefox split in several processes at a time: one [...]

leandro said on May 10, 2009, 2:20 am:

and about the new:tab ?? sorry if you blogged earlier, i cant remember…

Reply

Chuck in Dallas said on May 10, 2009, 12:21 pm:

Firefox is starting to fall behind. I’ll stick to it because of the great plugins but my original interest in FF was because it was cutting edge and fast.

Now it seems like a technology laggard and bloated. I hope they get their act together before Chrome or Safari comes from behind in innovation. Never mid IE, I won;t go back to MS.

Reply

Mike Lewis said on May 10, 2009, 11:55 pm:

I’d be happy if it just ran in Linux as fast as it does in Windows.

Reply

JP said on May 11, 2009, 5:17 pm:

Finally!
Better late then never, this is one of the things that have been long overdue.

Reply

Amar said on May 12, 2009, 12:51 pm:

If the goals of this project is to provide better responsiveness and improve robustness as a result – I think there can be another way than to use multiple processes. There is a screen cast on how we ensure responsiveness in Firefox by separating each JS application with an isolation called Script Space.

http://people.cs.vt.edu/~adeka/jstests/anim/mutidiv.htm

This is the example code that was run.
http://people.cs.vt.edu/~adeka/jstests/test_set/multidiv.html

A click on the button would cause the browser to run a busy JavaScript loop .Firefox will not be able to process any more event unless the loop completes.

We believe that JavaScript executions can be isolated if they belong to different events & different Script Space( this is a grouping of events based on DOM hierarchy) each event running in a separate thread. Threads then can be scheduled to ensure fairness in execution. By separating the execution of the onclick handlers , we can click on the second button while the other one is running its onclick handler – Thus ensuring responsiveness.

Reply

venkat said on May 17, 2009, 8:04 am:

single tab process always useful as Firefox is getting crashed common now a days ,if firefox crashed with this feature wonly one tab will be lost.

Reply

[...] A few weeks ago, Mozilla announced Electrolysis, a new project that aims to make Firefox a multi-process application, with separate processes for the user interface (chrome), each tab, and plugins, in order to provide higher stability as a a problem with a plugin or a certain web page wouldn’t bring down the whole session; higher performace, as today’s multi-core processors can handle multiple tasks at a time; and stronger security, as each could run on different security contexts. [...]

Mike Hall said on September 8, 2009, 3:17 pm:

Is it possible to have the best of both worlds? Continue single-process Firefox tabs, plus an option to create a new tab as a new process: basically as a new window, which looks like a tab, but perhaps in a different colour?

Reply

Jared Haer said on December 17, 2009, 4:44 pm:

Firefox could stand to improve it’s use of multiple processors. I have often noticed when Firefox is sluggish one core is maxed out at 100% utilization, while the other one is at almost 0%. I will follow this project closely as I am very excited about what it may offer!

Reply

Aaron said on March 23, 2010, 4:04 am:

Great! I really hope an informative task manager will go along with this, so one can single out resource hogs by tab, extension and plugin (like one can already in Google Chrome) or even the combinations of those (e.g. in which tab has the Flash plugin gone nuts or better which precise flash animation).
Right on!

Reply

Braniac said on July 6, 2010, 4:31 am:

The ff greyout sucks so much. Uploading images to a laboratory and whole ff stays gray. I cannot start a second instace cause the config files are locked from the hanging ff. We are in jul 2010, when will a threaded ff available?

Reply