Slashdot Mirror


Firefox Takes the Next Step Towards Rolling Out Multi-Process To Everyone (arstechnica.com)

An anonymous reader quotes a report from Ars Technica: With Firefox 50, Mozilla has rolled out the first major piece of its new multi-process architecture. Edge, Internet Explorer, Chrome, and Safari all have a multiple process design that separates their rendering engine -- the part of the browser that reads and interprets HTML, CSS, and JavaScript -- from the browser frame. They do this for stability reasons (if the rendering process crashes, it doesn't kill the entire browser) and security reasons (the rendering process can be run in a low-privilege sandbox, so exploitable flaws in the rendering engine are harder to take advantage of). Moreover, these browsers can all create multiple rendering engine processes and use different processes for different tabs. This means that the scope of a crash is narrowed even further, typically to a single tab. Internet Explorer and Chrome both implemented this long ago, in 2009. Firefox, however, has not offered a similar design. Although work on a multi-process browser was started in 2009, under the codename Electrolysis, that work was suspended between 2011 and 2013 as priorities within the organization shifted. In response, Mozilla started switching to a new extension system in 2015 that opened the door to a multi-process design. The first stage of Firefox's move to multi-process involves separating the browser shell from a single rendering process that's used by every tab. In Firefox 48, that feature was enabled for a small number of users who used no extensions. Firefox 49 was rolled out to include users running a limited selection of extensions. Now, in Firefox 50, a separate renderer process is used for most users and most extensions. Developers are now able to mark their extensions as explicitly multi-process compatible. Firefox 51 will extend this even further to cover all extensions, except those that are explicitly marked as incompatible. Mozilla says that, even with the limited changes made in Firefox 50, responsiveness of the browser has improved by 400 percent due to the separation between the renderer and the browser shell. During page loads, responsiveness will increase to 700 percent.

3 of 154 comments (clear)

  1. Re:Stopping processes of background tabs? by Anonymous Coward · · Score: 2, Interesting

    It's actually something they're investigating for Firefox right now, and one of their focuses for the whole Project Quantum thing seems to be to try to reduce the amount of CPU usage that background tabs get (unless it's somehow clear that they're supposed to be working in the background without being slowed down too much). Hard to say what the results will be at this early stage, but there's a lot of interesting stuff that seems possible now that they've rewritten most of the browser to support e10s.

  2. Not all rosy by markdavis · · Score: 1, Interesting

    Unfortunately there are some users who are going to be greatly adversely affected by Firefox moving to full multi-process. I am one of those. At work we make use of Firefox under Linux thin client environments, running on a centralized server. This type of change opens the door for Firefox to completely overrun all our CPU resources, no matter what we throw on it. Why? Because I am certain the Firefox developers won't give us an "off" switch for this new functionality (or if they do, it will be taken away eventually). See, if you are running on your own dedicated computer, it might be perfectly OK to unleash the browser to take over all your resources. But when it is a shared environment on a multiuser system, this can be horrible. Believe it or not, we do lots and lots of other things on that system at the same time. There aren't enough OS tricks available to deal with it. "Nice" just isn't enough (for a variety of reasons... none of which I have the time to explain right now). We are already having problems just trying to limit memory usage in Firefox (it would be the same with any browser) because ulimits don't apply correctly with certain types of threaded applications, just causing either no effect or crashing; and Firefox doesn't have good settings to deal with that either).

    Yes, I know what we do is a little unusual and old-fashioned, but it actually works pretty good and has a lot of advantages. I certainly don't want to hold Firefox back, but I do wish that the developers would consider the fringe cases and give us persistent options to prevent Firefox from taking over more than X number of cores. Choice, options, and settings are key, that way, everyone could "win".

  3. Generally speaking a good thing by m.dillon · · Score: 2, Interesting

    I'm glad they're finally giving each tab its own process. Of course, if they didn't they'd wind up in the dust bin of history... its about the minimum of work they need to do just to keep Firefox relevant. There is much more they need to do in addition. Honestly, Firefox's biggest competition here, after fixing the tab problem, is going to be chrome 55 with its significantly improved (reduced) memory footprint.

    The interesting thing about giving each tab its own process is that although this increases the total amount of memory used by the browser, it also has the effect of reducing the memory fragmentation that forces the OS to keep almost every byte of it in core (Firefox is best known for this effect). With the process separation, the OS will have a much easier time paging out unused memory without nominal browser operation forcing every single last page back in. THAT is a big deal, and is one of the reasons why chrome is so much more usable than firefox.

    I regularly leave my browser(s) running for weeks. Process sizes generally bloat up during that time, to the point where the browser is consuming ~8GB+ of ram. With Firefox the horrid memory management in-browser forces most of that to stay in core. With chrome, most of it gets paged out and stays out. This makes chrome far more usable, particularly considering the fact that my workstation runs from a SSD and has a relatively large (~60G) swap partition configured.

    But these days I'm a chrome user. Firefox has been too buggy for at least the last 4 years. It crashes on all sorts of things, taking the whole browser out with it. And after all this time they *STILL* can't fix the idiotic pop-up windows. Disable popups only disables some of them. That and the bugs is the main reason why I stopped using Firefox.

    In terms of sandboxing... also a good thing. In addition to the work the browser does, I also segregate my browser instances into multiple dummy user accounts (that my GUI buttons can just ssh into from my main account), and run multiple instances of the browser from those. One for unsecure browsing, one for browsing important accounts, and one with the most bulletproof setup I can think of (no video group access, no direct X server access)... which is slow, but about as safe as its possible to be in an X environment.

    People often forget about user account separation. It's a bit sad.

    -Matt