Multi-process Firefox, coming to an Internets near you

Benjamin Smedberg recently discussed the motivation for splitting Firefox into multiple process, so I won’t recap that here. Instead, I want to demonstrate what we’ve accomplished so far. The video below shows our nearly Phase I-complete browser. (Back and Forward don’t work yet, but are relatively easy to add.)

First, I browse around. Nothing particularly exciting there, except that two Firefox programs are running — Firefox itself, and gecko-iframe. The second program is new: it’s drawing the web pages to the screen. Currently in Firefox, this is all done within the same program.

The fun comes when I kill -9 this gecko-iframe, the “tab” containing mozilla.com. To the non-geeky, invoking kill -9 on a program causes it to crash IMMEDIATELY. This simulates what would happen if, say, you tried to run a buggy plugin and it got itself into trouble. Notice that only the “content” disappears when the page crashes; the user interface itself keeps running as if nothing happened. This is a big step forward! If I were to kill -9 the current version of Firefox, everything would die, user interface and tabs.

With Firefox protected from buggy pages and plugins, more fun is possible. This video shows me pressing a “Recover” button that relaunches the page that just crashed. There are many more possibilities for recovering from these errors, and I’m excited to see what our user interface folks cook up.

This demo shows off a lot of hard work from Ben Turner, Benjamin Smedberg, Boris Zbarsky, and Joe Drew. (We also have plugins running in their own, separate processes, in an incomplete way. However, the plugins still refuse to draw to the screen and so wouldn’t make for a very good demo.) Drop by #content on IRC or read mozilla.dev.tech.dom if you want to find out more details of what the Electrolysis team is up to.

Comments (31)

  1. Ibrahim wrote::

    Nice! This is really the only thing that Chrome has over Firefox, in that one tab crashing takes the whole thing down, but this rarely happens for me. Plugins taking down the browser do suck though. Can we expect Firefox.next to be multiprocesses, or is it going to have to wait until Firefox 4/5 or farther along the line? I understand that it’s a lot of work to completely rearchitect Firefox, but it should be beneficial.

    Sunday, June 21, 2009 at 23:13 #
  2. cjones wrote::

    Ibrahmin, we don’t even have a guess for when this will be releasable. However, we’ll likely have limited-function, bleeding-edge development builds available “soon,” maybe in a few months. We’d love to have your help, even if it’s limited to pre-alpha testing!

    Sunday, June 21, 2009 at 23:55 #
  3. hot.

    Sunday, June 21, 2009 at 23:57 #
  4. David Naylor wrote::

    This is great news! Esp. to someone like me who has just ordered there first multicore PC … :D

    Monday, June 22, 2009 at 00:39 #
  5. Seth Wagoner wrote::

    Fantastic. Quite apart from the benefit of a crash not taking out the whole browser, it would be really good for folks to be able to see that it’s Flash, or Quicktime, or that dodgy addon, taking up all their memory and CPU, and not Firefox itself (or one of the well behaved addons that occaisionally get blamed for this sort of thing)

    Monday, June 22, 2009 at 00:40 #
  6. pd wrote::

    superb news especially so soon after reading Smedbergs article only last week.

    Congratulations

    Monday, June 22, 2009 at 01:06 #
  7. Ibrahim wrote::

    Awesome, I look forward to some bleeding edge builds then. Browsing is no fun unless you lose your profile at least once a week ;).

    Monday, June 22, 2009 at 01:08 #
  8. Blair McBride wrote::

    An impressive start!

    Monday, June 22, 2009 at 01:32 #
  9. Each tab running as a separate isolated process!?

    It looks like Firefox is steadily turning into a full-blown operating system now :)

    Monday, June 22, 2009 at 02:07 #
  10. Kai wrote::

    Great work.. Congratulations

    Monday, June 22, 2009 at 02:28 #
  11. Dan wrote::

    Awesome. This is one of the big advantages of Chrome so to match it would be great. An about: page like theirs would be cool too, detailing how much CPU, RAM and network each tab is using.

    Monday, June 22, 2009 at 02:29 #
  12. Can we also have the ability to run several firefox processes? with different profiles?

    Monday, June 22, 2009 at 07:28 #
  13. cjones wrote::

    Laurian, you can already do that today. Just start one Firefox with the arguments |-P fooprofile -no-remote| and the other with |-P barprofile -no-remote|, where of course fooprofile and barprofile are the two you want to use.

    Monday, June 22, 2009 at 09:25 #
  14. Peter Kasting wrote::

    Nice work :). If there is anything you’ve done to Chromium code that would be useful to send back upstream, please do, we’d probably be happy to take it :)

    Monday, June 22, 2009 at 12:23 #
  15. cjones wrote::

    Peter, thanks! We’re definitely interested in cross-pollination. Free software FTW!

    Monday, June 22, 2009 at 12:59 #
  16. David Bolter wrote::

    Goosebumps. Is this happening on a branch?

    Monday, June 22, 2009 at 16:20 #
  17. cjones wrote::

    David, yes, this work is littered across three branches right now :(, though we intend to merge back into m-c. Now that we’re almost done with our “sprint” to working code, a cleanup should happen soon. This info will probably show up on the “Content Proceses” w.m.o page.

    Monday, June 22, 2009 at 17:31 #
  18. Shane wrote::

    If you could please send me this pre-pre-alpha snapshot of Project Electrolysis because I like to help out by crash testing browsers and in case you would like to know, I don’t use plugins or add-ons so that shouldn’t be a problem. If I can’t have access to it (although I want to show other people this because I am a Mozilla Campus Rep) will it use high amounts of RAM?

    Tuesday, June 23, 2009 at 11:06 #
  19. cjones wrote::

    Shane, it’s best for us to continue this discussion over e-mail. Would you please e-mail cjones@mozilla.com describing what you want to do with the prototype and what operating system / version (e.g., OS X 10.5) you use?

    Tuesday, June 23, 2009 at 11:11 #
  20. Moz Developer wrote::

    I hope these multi-process changes won’t break an extensions ability to query down into the DOMs across several different tabs. This may also wreak havoc on extensions which expect a single-threaded UI. Lastly, Venkman… its gonna need to be enhanced to deal with multiple Firefox processes BEFORE you even think about releasing a version of Firefox with these changes, else our add-ons developers will be SOL. :-)

    Friday, June 26, 2009 at 15:58 #
  21. cjones wrote::

    Moz Developer, of course we’re not going to wantonly break extensions, and of course we’ll provide debugging support. That said, not all the current APIs may make the cut.

    Monday, June 29, 2009 at 13:13 #
  22. Adnan Siddiqi wrote::

    What you guys have been planning after today’s Hot news,the Chrome OS.?

    Wednesday, July 8, 2009 at 11:55 #
  23. asdf wrote::

    Woah! You mean I’ll finally be able to give and run pesky bookmarks a nice -20 priority so their rendering doesn’t suck all my cycles?
    Hells yeah, I’ll take that feature.
    Thanks for multiproc firefox!!!

    Wednesday, July 8, 2009 at 12:26 #
  24. Ben wrote::

    Has anyone looked at using seccomp on Linux or other process isolation or privilege dropping techniques on the rendering process?

    Wednesday, July 8, 2009 at 13:09 #
  25. anon wrote::

    I’m glad this feature is finally on its way, thanks for the work on it to everyone involved.

    The way I read forums on line is generally to go to “view new posts” page, then just ctrl-click on all the threads I want to look at. This is a killer for FF, and generally the browser stops and starts responding for a period of several minutes, depending on things like posts/thread, graphics, number of new tabs….

    A process per tab would be excellent for me… and might even convince me to upgrade FF from v2, as I am avoiding the new URL bar.

    I should think this has been proposed, but how about the foreground tab being at higher priority than the background tabs? That’d help us poor single corers too ;)

    Wednesday, July 8, 2009 at 15:56 #
  26. cjones wrote::

    @Adam: this has been in various stages of planning for at least 8 years.

    @asdf: you might want to read |man nice| again.

    @Ben: we at Mozilla haven’t been looking at security in earnest yet, but I know that the Google Chromium team at least considered using seccomp. I don’t know what they eventually chose, though.

    @anon: scheduling and prioritization of Firefox processes is pretty far down the road right now ;). But your suggestion is definitely something I’d like to implement eventually.

    Thursday, July 9, 2009 at 09:39 #
  27. hank wrote::

    i think that a separate hidden window/process for tracemonkey to do the javascript in would be good like chrome has that might ad more speed also overall this looks like a great idea i thank and praise you for your work on this so far

    Sunday, September 13, 2009 at 16:52 #
  28. E71 wrote::

    Old news yet here were are on Firefox 4.0 and disappointingly there’s no one-process-per-tab functionality in sight…

    Just a separate process for plugins… nowhere near as useful (at least for me).

    Tuesday, April 5, 2011 at 05:05 #
  29. IT Rush wrote::

    That’s the very reason FF is becoming so popular.. Keep it up.

    Friday, April 15, 2011 at 08:03 #
  30. Tim wrote::

    Does it really make that much of a difference? I’m sitting here with firefox 5, and compared to opera 11 it doesn’t seem that much quicker. Unless opera has the same technology..?

    Sunday, August 21, 2011 at 04:48 #
  31. cjones wrote::

    Tim: We still haven’t enabled out-of-process web content in desktop Firefox.

    Wednesday, November 23, 2011 at 09:39 #

Trackbacks/Pingbacks (27)

  1. multi-process firefox demonstrated... on Sunday, June 21, 2009 at 23:25

    multi-process firefox demonstrated…

    Chris Jones has a demo video up showing some of the early progress that he, Ben Smedberg, Ben Turner, Boris Zbarsky, and Joe Drew are making on multi-process Firefox…….

  2. Multi Process Firefox Demonstrated on Monday, June 22, 2009 at 01:58

    [...] Multi Process Firefox DemonstratedWritten by Vygantas Lipskas on June 22, 2009Chris Pitchin has posted a video which demonstrates Firefox multi process [...]

  3. [...] Multi-process !Firefox demo http://blog.mozilla.org/cjones/2009/06/21/multi-process-firefox-coming-to-an-internets-near-you/ [...]

  4. Christopher Blizzard · multi-process firefox on Monday, June 22, 2009 at 04:46

    [...] Jones has put together a demo video of a super-early stage Gecko-driven browser that’s multi-process.  It’s super-duper [...]

  5. Video Demo de Firefox multiproceso [ING]... on Monday, June 22, 2009 at 06:34

    Video Demo de Firefox multiproceso [ING]…

    Vídeo de demostración de trabajo en multiproceso de la próxima versión de Mozilla Firefox, aún en la primera fase de su calendario de desarrollo. Si tu navegador no soporta el tagg <video> con formatos libres, puedes acceder directamente al …

  6. Hola PO! » Firefox se prepara para ser multiproceso on Monday, June 22, 2009 at 07:51

    [...] | Blog de Chris Pitchin’ de Mozilla Enlace | Planning del proyecto Vídeo | Primer [...]

  7. Firefox se prepara para ser multiproceso : Blogografia on Monday, June 22, 2009 at 08:01

    [...] | Blog de Chris Pitchin’ de Mozilla Enlace | Planning del proyecto Vídeo | Primer [...]

  8. [...] | Blog de Chris Pitchin’ de Mozilla Enlace | Planning del proyecto Vídeo | Primer [...]

  9. [...] hier gibt es ein Video eines Gecko-Browsers, der in mehrere Prozesse aufgeteilt ist. Das alles ist noch in einer sehr frühen Phase und es wird noch eine ganze Weile bis zum Release einer Firefox-Version, die für Tabs und Plugins extra Prozesse verwendet, dauern. Ein erster Schritt ist aber getan. [...]

  10. [...] | Blog de Chris Pitchin’ de Mozilla Enlace | Planning del proyecto Vídeo | Primer prototipo Share and [...]

  11. Antipode - Link - Electrolysis: Separating Firefox on Monday, June 22, 2009 at 11:12

    [...] Chrome. This has been my #1 feature request for Firefox for quite some time, and now they’ve got their proof of concept running. Considering the size and age of the Gecko code, though, I won’t be holding my breath quite [...]

  12. [...] Benjamin Smedberg, Boris Zbarsky, Ben Turner, Joe Drew, and Jason Duell among others, has released a demo video that shows a very basic implementation with a process running Firefox’s UI and another that [...]

  13. Multi-Process-Firefox | envision on Monday, June 22, 2009 at 12:17

    [...] aber zumindest die erste Phase des Prozesses ist inzwischen erreicht. Chris Jones zeigt hier in einem Video, wie das funktioniert. This entry was posted on Monday, June 22nd, 2009 at 20:17. [...]

  14. [...] Vía | Blog de Chris Pitchin’ de Mozilla [...]

  15. [...] Jones just posted a Multi-process Firefox, coming to an Internets near you write-up to his blog about, Electrolysis project (coordinated by Benjamin Smedberg, with Joe Drew, [...]

  16. [...] out Chris Jones’ post on a very raw demo of our ongoing multi-process browser work. This work completes Phase I, and [...]

  17. [...] | Blog de Chris Pitchin’ de Mozilla Enlace | Planning del proyecto Vídeo | Primer [...]

  18. [...] posted about the motivation for splitting Firefox into multiple processes, and now Chris Jones has posted a video (Ogg format, viewable with Firefox 3.5) that demonstrates what the team has accomplished so far. [...]

  19. Firefox Multiprocesso... on Wednesday, June 24, 2009 at 10:28

    Firefox Multiprocesso…

    Chris Jones postou em seu blog um vídeo mostrando um protótipo inicial do firefox multiprocesso.
    Na versão demonstrada, existem dois processos rodando: o firefox em si e o novo gecko-iframe, que é quem desenha as páginas na tela. Atualmente, o pr…

  20. [...] | Blog de Chris Pitchin’ de Mozilla Enlace | Planning del proyecto Vídeo | Primer [...]

  21. [...] Topic Notes: Multi-Process Firefox Demo Video Android new SDK Apple yanks adult content application. Windows 7 Pricing Palm App Catalog 30 Apps, [...]

  22. [...] Jones has put together a demo video of a super-early stage Gecko-driven browser that’s multi-process.  It’s super-duper early and [...]

  23. [...] Benjamin Smedberg, Boris Zbarsky, Ben Turner, Joe Drew y Jason Duell entre otros, ha publicado un video demostración que nos ofrece un vistazo a la implementación básica con un proceso ejecutando la interfaz de [...]

  24. [...] itself keeps running as if nothing happened. This is a big step forward,” he wrote in a blog entry about the demo. “With Firefox protected from buggy pages and plugins, more fun is possible. [...]

  25. [...] Arstechnica.com报道,Mozilla即将在Firefox中加入多进程浏览功能,这项功能已存在于Google Chrome浏览器中,它将能帮助改进Firefox浏览器的稳定性和安全性。 该项目名叫Electrolysis,开发者已推出一个原型,每一个网页都由一个单独的进程渲染。Firefox开发者过去早就探讨过多进程浏览,但并未引起重视,直到Google和微软各自发布了支持多进程浏览的浏览器。在Firefox加入多进程浏览并不是一个简单的任务,许多底层的组件都必须进行修改。上个月开发者演示了一个原型,显示单个网页崩溃并不会影响整个浏览器。开发者希望能尽快在nightly版中加入该功能,让更多人进行测试。不过目前Mac OS X版的开发还未展开。 [...]

  26. [...] Un primo esempio di questo approccio è stato illustrato in questo screencast (in formato OGG Theora), dove viene mostrato un prototipo di browser che esegue il rendering delle pagine web in processi separati e isolati da quello principale. Maggiori informazioni su questa dimostrazione vengono fornite in questo post. [...]

  27. On Competition - Kurifuri on Thursday, July 9, 2009 at 21:18

    [...] it’s coming to Firefox. (Yeah, this is old news by [...]