New Firefox Project Could Mean Multi-Processor Support
suraj.sun writes with this excerpt from Mozilla Links "Mozilla has started a new project to make Firefox split in 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."
Why isn't everyone doing this?
As chipmakers demo 64 or 128 core chips, why aren't we coding and being trained in Erlang? Why aren't schools teaching this as a mandatory class? Why aren't old applications being broken down and analyzed to multithread components that don't interact? Why isn't the compiler theory concentrating on how to automate this (if possible)?
It's becoming obvious the number of cores is going to far outweigh the number of applications we'll be running five years from now (so you can't leave it up to the OS) so why isn't this a bigger concentration now in application development?
I understand a lot of server side stuff can take advantage of this (in the nature of serving many clients at once) but it's only a matter of time before it's typical on the desktop.
My work here is dung.
I think the main benefit of such a system would be responsiveness. It is very unpleasant when one tab temporarily causes the entire browser window to become completely unresponsive--including the STOP button or the button to CLOSE the misbehaving tab. The UI should never freeze for any reason.
A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
Otherwise, I'd probably switch to google chrome eventually, which doesn't have the add-on support I enjoy from firefox.
This is great. I'm sick of that stupid integrated PDF viewer made by Adobe that always crashes my whole browser. Now it'll just crash a tiny bit.
I have left slashdot and am now on Soylent News. FUCK YOU DICE.
Does the process separation prevent badly-behaved plugins needed for a good portion of websites in existence these days *cough*flash*cough*acrobat*cough* from killing your browser when they inevitably decide to break? Both plugins have been killing me on both win32 and linux. Noscript and mozplugger or foxit help to some degree, but firefox is by far the most unstable program I use these days because of plugins.
Processes vs Threads...
I'm pretty certain that the usual 40-60 pages I have open are going to blow the memory if each runs in its own process.
GPLv2: I want my rights, I want my phone call! DRM: What use is a phone call, if you are unable to speak?
I guess it can be useful in determining which site I visit tends to create the memory leaks I still experience (even with ff3).
(as I type, this current browser session has ballooned to over 600MB...which is still better than my typical with ff2...which was 700-800MB)
maybe they can dedicate a process just for "garbage collection".
How about FireFork?
Now, this sample browser with process isolation took a couple of hours to develop:
http://ivan.fomentgroup.org/blog/2009/03/29/instant-chrome/
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.
While I believe this feature would improve Firefox in a big way, I also believe it was not badly needed at present because I have found Firefox to be pretty stable on all systems I have used it.
What I would have wanted to see is implementation of uniformity across all platforms especially Windows and Linux. Its user experience on Linux is still wanting from configuration options in unfamiliar places to that "old weird look and feel" one gets on the Linux platform.
Since QT 4.5 is not LGPL...how about re-creating its interface using QT like folks at VideoLan did. This would go a great way in improving the user experience.
I guess such a move would break compatibility with the thousands of extensions now available for Firefox, but folks, we must move on from time to time.
Am I wrong and unrealistic?
... is to surrender in order to accept buggy as hell plug-ins or memory leaks as "acceptable".
Current multithreaded Firefox is able to use multiple CPUs, being the reason of splitting the tabs into independent processes is to surrender to mediocrity. How about increasing Q&A, do proper synchronization between components, and don't allow untested components to be used without showing a big warning at installation?
Will Chrome mature to have a nice system of plugins to match the advantages of Firefox before Firefox rearchitects this very low level code?
I sometimes wonder about the FF devs - I've been wondering about the lack of a multi-threaded (at least) UI for a few years now. That project kept getting put off and put off until there was too much code to change easily. Only now that a real competitor comes along do they bother with the obvious thing that should've been put in from the start. Do FF devs not actually USE FF? Or do they not browse sites with Flash apps that go out of control and make the browser completely unresponsive? I find that hard to believe.
Whatever. At least it'll finally happen. One wonders how many people will have switched over to Chrome by the time they get this out the door, though.
They both have geek-cred, but Chrome people say Firefox is unstable, while Firefox people complain Chrome has no extensions. So it's a race between the two browsers: will Firefox get tab isolation before Chrome, or will Chrome get extension support before Firefox? Either way, we users win.
The advantage of single-processor apps in a less-than-perfect OS, is that when the app decides to chomp up all the CPU that it can grab, it doesn't cripple your machine. Moving from one to two cores for me has meant that browsers can't suck down 100% of my CPU and prevent me from even closing them for minutes at a time. This had better not let Firefox use up 100% of my machine again.
Because it's hard?
Moderators: Before moderating a comment Insightful/Informative, check to see if a child post has already refuted it.
When was the last time a broken tab brought down your whole browser without a java applet being involved?
The project name should be: Late to the Partyzilla
"Will Chrome mature to have a nice system of plugins to match the advantages of Firefox before Firefox rearchitects this very low level code?"
Chrome already has plugin support well along in development.
And your wondering if a complete top to bottom rewrite of the stinking pile of shit codebase that is Firefox is going to arrive sooner?
LOL!
How many years did it take the clowns to even admit to FF's massive memory/resource leaks, let alone actually finally do something to less them?
I would love to see this as a core FF engine option -- a setting that says "Don't waste any processing power on anything other than what's right in front of me."
So now when firefox wigs out and starts chewing up all available CPU cycles, it will take up 100% of my cycles instead of the 50% available to one CPU.
Jherico
What can the average user can do to ensure his security? "Nothing, you're screwed"
For the last few years Google's strategy has been to make the browser the platform of choice. That would make the whole Windows, Linux, Mac, mobile whatever choice irrelevant.
Making Firefox act more like a real operating system, each "application" runs in its own process is another step in that direction. It means that my gmail browser window won't crash if I surf to some buggy website. And it means that I can run a lot of browser based application faster and more stably.
This is the next logical step for people to start using Google word processor running in firefox instead of Word or OpenOffice. Once there's a stable browser based platform for browser applications to run in, a whole world of possibilities begins to opens up.
Google's in-house browser and Microsoft's closed source browser are both ahead of an OSS project in terms of features because they're not reacting to market leaders? (I am aware that Chromium is open source, but Google does not solicit patches from the community)
This is completely unlike Looking Glass/Aero/Compiz, and is completely dissimilar from Office/OpenOffice, and I doubt the situation has anything in common with .Net/Mono.
I meant to say: "...QT is now LGPL..."
My mistake.
Sure, making more process make it possible to run on multi-core and/or multi-cpu. There is no doubt this is the future but there is a way better way of running things on multiple cpu/core. It is not a new invention, they are called threads ! ... ? Ok, plug-ins can be crap, load each separate one in their own process (all instances of a same plug-in in the same process, it would also save memory as they could share the not written to pages in same process as would IE running all tabs in same process). Different processes cannot share the same shared pages like threads can, having every tab is a process use a lot more memory than it really should. Opening 8 empty tabs in IE8 is close to 300 meg or ram, I did not even dare loading any big website in them. I am a professional software developer and I'm getting more and more frustrated on how sloppy software development gets just because people can buy better hardware. No we cannot do all those nice feature with 640k of ram but it does not require 3 gig ! For everyones information I'm not a big microsoft nor linux fan and I'm currently using Opera on XP and I can't remember last time it crashed.
I fully understand they are not protected from each other so if one crash it could bring the whole app down. However I would expect the 8th version of an application like IE not to crash and burn everyday
Why isn't everyone doing this?
To comply with the open source community's "Microsoft Tail Lights" rule, the Firefox team did not work on anything until Microsoft had already done it.
It's hard work coming up with good ideas. It's far easier to just look at what Microsoft does, then copy that.
Are we always going to need operating systems?
One such: Foxit Reader works quite well in Firefox.
Strikes me as odd it hasn't been mentioned already. I know, I know, it's beerwise "gratis" as opposed to [F]OSS, but a Windows user should tolerate it well ;)
This post contains no rudeness or derision of any kind. All arguments are friendly. Terms and exclusions may apply.
... and soon I'll have it in my favorite browser! Hooray!
I hope this integrates nicely with Tamarin and makes its way into FF4.
FireProcs, of course!
I am anarch of all I survey.
Get the DAMN THING TO RUN ON 1 PROCESSOR WITHOUT CRASHING!! For heavens sake!! It reminds me of an early version of IE. How sad. I can't go to my local weather page without it crashing! It's crazy bad.
It's most definitely about time, each tab should have it's own process and it should support multiple cores.
I love firefox but the performance is not what it should be, considering the 3ghz quad core machines we throw at it.
I mean it's moving pictures and text around for goodness sakes, also a tab should not lock up my whole damned browser!
It is all in implementation. Safari is neat in that it does something similar--at least with youtube-like flash videos. When I open a video in a new tab, it will load the contents but not play anything until I select the tab. It will keep playing if I select another tab.
Something like this in Firefox would be great. Load the page in the background, but do not run it until I actually click on the tab. It seems like a nice compromise between the GP's wishes and those who like stuff running in the background.
Slow Down Cowboy! It's been 1 hour, 47 minutes since you last successfully posted a comment
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)
Oh wait, I got a great idea for a name: Netscape Navigator 3!
-Billco, Fnarg.com
Does this mean that when ff goes out of control that it will instead of using up 99% of one cpu, use up 99% of each one?! I guess it's only on one machine that I currently have that problem, but it seems that it's stability on a single cpu ought to be a higher priority.
More complexity. Just what we need.
Like Firefox wouldn't already be a wild beast.
Like it wouldn't already be a loose cannon.
Look what that the tooth fairy brought last month:
CVE-2009-1313 (04/30/2009)
CVE-2009-1312 (04/22/2009)
CVE-2009-1311 (04/22/2009)
CVE-2009-1310 (04/22/2009)
CVE-2009-1309 (04/22/2009)
CVE-2009-1308 (04/22/2009)
CVE-2009-1307 (04/22/2009)
CVE-2009-1306 (04/22/2009)
CVE-2009-1305 (04/22/2009)
CVE-2009-1305 (04/22/2009)
CVE-2009-1304 (04/22/2009)
CVE-2009-1304 (04/22/2009)
CVE-2009-1303 (04/22/2009)
CVE-2009-1302 (04/22/2009)
CVE-2009-1232 (04/02/2009)
With that pace we are indeed going to need Multi-Processor Support to handle the vulnerability information.
The one thread per tab idea is nice, but the usual usecase is only one tab doing something. Nice for tab isolation, but not of great benefit for performance. It would seem to me that real benefit on a multicore box would come from parallelizing the bottleknecks, if possible... ie, the page rendering. Splitting the rendering on contained dom elements, perhaps. I'm not sure where or how this is best implemented, but addressing the cpu bottleknecks would seem to be the way to a faster browser.
this is THE major reason chrome is my browser of choice. I am sick to death of shitty javascripts, plugings, etc freezing my browser so that i can't continue browsing while i wait in the other 5-6 tabs I've queued up.
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
This is going to get confusing.
In my experience, the HTML rendering is not the major crash or performance bottleneck issue with Mozilla.
Users want separate processes for all plugins, i.e. a switchable mode in-process or out-of-process mode selectable for each plugin through Mozilla configuration. Let the plugins crash in their own, see ndiswrapper for some ideas on that.
Users want a JavaScript engine that operates in a thread of its own (an extra thread per tab as necessary, when there is JavaScript work to do, think like dynamic thread pooling of JavaScript worker threads, most of the time 1 or 2 threads will handle JS in all your tabs).
Users want all file/disk access to be in a separate thread to the UI. I believe network I/O already is (or is non-blocking at least).
Hey move the entire file configuration/ SQLLite/ management for mozilla to a separate process that doesn't crash (even if the main Mozilla UI does). Users also want that damn stupid Linux/ext4 issue fixed and the horrible performance fixed, yes mozilla is more crazy than linux, and nope as a user it is Mozilla that crashes not the Linux the OS. In order to get application level crash recovery you make all writes to your database journaled through your own logfile. It is only the writes to that journal that need to sync to disk. Yes Eric is right mozilla should be more efficient in reducing the probability that a write to disk needs to extend a file so syncs don't cause an inode flush to stall the fs transaction throughput.
But separate web pages in separate processes, just makes no sense to me. Most of the time requires little CPU as reading/thinking time dominates the moments of Mozilla klunkyness.
I've been using Chrome since it came out, and the fact is, generally the problems with Chrome is that the main task is the problem it crashes, getting up to over 300KB in resources, and that's just for the main task.
In fact, when it's at the time of crash, almost every task runs more than my anti-virus and dwm.exe.
I don't know if the problem is with Vista or not, but I share my home computer with my grandfather who barely understands Windows, so switching to another OS is out of the question.
Has the old saint in his forest not yet heard of it? That God is dead?
http://slashdot.org/comments.pl?sid=1221343&cid=27831925
http://slashdot.org/comments.pl?sid=1221343&cid=27831925
which causes firefox to open a "choose application" which defaults to acrobat, the application.
Problem solved. It's a lot faster ;)
Don't kid yourself. It's the size of the regexp AND how you use it that counts.
Ah, yes...the problem with Firefox is one of poor design, with only 1 thread to manage all of the user's input and tasks. With 13 active windows, and an additional 79 background tabs (94 tabs total), I have about 33 threads allocated, but only 1 thread being used to actually manage user input and the various 'active' tabs (apparently 1 of the tabs, (who knows which one, FF doesn't provide any way to tell which 'tab' it is, i.e.-no internal 'ps') is hogging things). Of course if this was a real OS, we could see what was hogging the cpu and the rest of the browser could run on one of the *3* other 'idle' cores. But hey, this makes for easier design -- just doesn't scale well.
CPU |CSWitch|Thread
96.96 |866 |firefox.exe+0x15a0
|7 |M0ZCRT19.dl|!endthreadex+0xa0
|2 |MSVCR71.dll!_threadstartex
| |xul.dll!gfxPattern::~gfxPattern+0x75
| |MOZCRT19.dll!endthreadex+0xa0
|42 |MOZCRT19.dll!endthreadex+0xa0
| |MOZCRT19.dll!endthreadex+0xa0 [5 copies of this line]
| |wdmaud.drv!MixerCallbackThread
| |WINMM.dll!mciwindow
|2144 |WINMM.dll!timeThread
| |kernel32_dllBaseThreadStartThunk
| |NPSWF32dll!native_ShockwaveFlash_TCallLabel+0x14ad3 [4 copies of this line]
|2 |MSVCR71.dll!_threadstartex
| |MSVCR71.dll!_threadstartex [6 copies of this line]
|45 |MSVCR71.dll!_threadstartex
| |MSVCR71.dll!_threadstartex [6 copies of this line]
| |RPCRT4.dll!ThreadStartRoutine
| |mswsock.dll!SockAsyncThread
Can't imagine *why* anyone would even consider needing a multiprocessor browser, unless they, um, left it up for days at a time, and often were in the middle of one task or project, then after a break came back and got involved in another -- usually with all windows being shut down in some stack-like order unless windows or the browser crashes. One window with ~20 background tabs had all of the day's slashdot-headlines-of-interest opened with me slowly clicking through them (getting interrupted and not finishing the tabs, now, a day later....*cough*).
Ok...so I have alot on my plate -- not to mention books to read, emails to write, articles and letters to write...way much more to do than I have time for, but what else is new? :-)
p.s.The '|' separated table layout is a slashdot *feature*. Readers are to do layout in their brains.