Live data from Hacker News

Electrolysis – run web content in a separate process from Firefox

wiki.mozilla.org

51–60 of 107 posts

Re: Electrolysis – run web content in a separate process from Firefox

#51

After versioning, functionality and UI they now copy sandbox-mode from the Chromium project. I don't think there's much time left before you won't be able to make the distinction between Firefox and Chromium anymore.

You mean that Chrome copied IE's sandboxing?

From what I've heard from both Google and MS people, Chrome had it first, it's just IE announced it (and shipped it in a beta) first. Alternatively, if you don't want to trust word of mouth — there's no way the Chrome team did their entire sandboxing implementation in the five months between IE announcing it and the announcement of Chrome, it's just too much work.

Re: Electrolysis – run web content in a separate process from Firefox

#52

Earlier quoted context omitted.

Firefox: Averages ~5MB/tab (200 tabs, 1GB memory) Chrome: Anywhere from 50MB/tab up. A much better performance fix would be to suspend javascript execution on tabs that aren't visible.

On Chrome, the OS can page all those other tabs to disk without affecting performance of the current tab. On Firefox, you're going to feel it.

Why can't the OS page Firefox's memory to disk too? Paging is done at much finer granularity than per-process.

Re: Electrolysis – run web content in a separate process from Firefox

#53
post #49

Earlier quoted context omitted.

It's not about protecting the tabs from each other; when you separate the tasks into different containers, you can apply strong limits to what each can do, which makes it harder to "root the machine". For example, see the Chromium docs: http://www.chromium.org/developers/design-documents/multi-pr...

I see, this is more about sandboxing the renderer. Not necessarily sandboxing the tabs. Right? Curious if one really required the other. And, still, kind of amusing that the entire point of the browser is that it is sandboxed from the whole computer. Seems if we just restricted what the browser was capable of as a whole, we'd be there.

Trying to restrict the browser as a whole doesn't work for a couple reasons:

1. The browser as a whole needs to have permission to do quite a few things, including reading from and writing to the filesystem (for uploading and downloading files), talking to your system's graphical environment so it can display windows, and accessing arbitrary hosts on the network so it can access web servers. It's just not possible to meaningfully sandbox something requiring so much access. Individual browser components, on the other hand, can be designed to do very specific tasks and are thus easier to isolate.

2. You want to protect not only your system from a browser exploit but also other parts of the browser. A site that exploits a browser vulnerability shouldn't be able to read your cookies for another site.

These reasons imply that you need to focus on isolating and restricting components inside the browser instead of the browser as a whole.

Re: Electrolysis – run web content in a separate process from Firefox

#54
post #49

Earlier quoted context omitted.

It's not about protecting the tabs from each other; when you separate the tasks into different containers, you can apply strong limits to what each can do, which makes it harder to "root the machine". For example, see the Chromium docs: http://www.chromium.org/developers/design-documents/multi-pr...

I see, this is more about sandboxing the renderer. Not necessarily sandboxing the tabs. Right? Curious if one really required the other. And, still, kind of amusing that the entire point of the browser is that it is sandboxed from the whole computer. Seems if we just restricted what the browser was capable of as a whole, we'd be there.

If you sandbox the whole browser, it can't actually do anything, including actually display the webpages or connecting to sites.

Re: Electrolysis – run web content in a separate process from Firefox

#55
post #53
post #49

Earlier quoted context omitted.

I see, this is more about sandboxing the renderer. Not necessarily sandboxing the tabs. Right? Curious if one really required the other. And, still, kind of amusing that the entire point of the browser is that it is sandboxed from the whole computer. Seems if we just restricted what the browser was capable of as a whole, we'd be there.

Trying to restrict the browser as a whole doesn't work for a couple reasons: 1. The browser as a whole needs to have permission to do quite a few things, including reading from and writing to the filesystem (for uploading and downloading files), talking to your system's graphical environment so it can display windows, and accessing arbitrary hosts on the network so it can access web servers. It's just not possible to…

Your last sentence is a better worded version of what I meant. That it is less that the tabs are isolated and sandboxed, and more that components of the browser are.

Re: Electrolysis – run web content in a separate process from Firefox

#56
post #16

Earlier quoted context omitted.

Firefox: Averages ~5MB/tab (200 tabs, 1GB memory) Chrome: Anywhere from 50MB/tab up. A much better performance fix would be to suspend javascript execution on tabs that aren't visible.

I am not questioning reasons to have 200 open tabs, but wonder how do you manage it? I would imagine tab bar become very long?

Although I don't get anywhere near 200 tabs, I hit the same type of UI management issue. I use contextualized "sessions" using panorama in Firefox (Ctrl-Shift-E). I have 10-20 tabs per context, and somewhere between 6 and 10 contexts. Between Panorama and TreeStyle tabs (a plugin), everything is neatly organized.

Panorama is a life-saver if you have to context-switch between projects regularly.

TreeStyle, really, I use more as a means to move screen real-estate to horizontal usage on my laptop's 16:9 screen. Tab organization is a side benefit.

Re: Electrolysis – run web content in a separate process from Firefox

#57
post #20

Earlier quoted context omitted.

Be aware that Adblock Plus for Chrome increases significantly RAM usage for each open tab. uBlock author has extensive benchmarks about this issue. https://github.com/gorhill/uBlock/wiki/%C2%B5Block-vs.-ABP:-...

Whichever one it is for chrome I have, it isn't ABP, it's a generic named Adblock. I don't use ABP due to the developer accepting money to whitelist google adverts.

AdBlock is significantly worst than ABP memory usage-wise (edit: on Chromium, I didn't benchmark elsewhere). I believe this is also the case CPU-wise from observing Task Manager during benchmarks.

Re: Electrolysis – run web content in a separate process from Firefox

#58

Earlier quoted context omitted.

On Chrome, the OS can page all those other tabs to disk without affecting performance of the current tab. On Firefox, you're going to feel it.

Why can't the OS page Firefox's memory to disk too? Paging is done at much finer granularity than per-process.

Because, as I said earlier, "you're going to feel it." If your tabs are allocating in the same process address space as each other, accessing your current tab's data is likely to cause swapping. The key point is that electrolysis and chromium-based browsers can page inactive tabs "without affecting performance of the current tab."

Re: Electrolysis – run web content in a separate process from Firefox

#59

Yay, now firefox can waste just as much memory as Chrome. Guess 1GB for the whole browser wasn't enough; they had to go for ~100MB/tab. Got to keep up with Chrome after all. If I use chrome for normal browsing (I don't normally because its feature set is poor, customisability is a dirty words, and I don't like the privacy risk), it can rapidly slurp 4GB or more of memory (with perhaps two key addons, adblock and DoNo…

In the big picture, sandboxing may actually help memory consumption in the long run. When a tab close, a process close, and the OS ensure that all memory for that process is freed as well.

Re: Electrolysis – run web content in a separate process from Firefox

#60

Earlier quoted context omitted.

Why can't the OS page Firefox's memory to disk too? Paging is done at much finer granularity than per-process.

Because, as I said earlier, "you're going to feel it." If your tabs are allocating in the same process address space as each other, accessing your current tab's data is likely to cause swapping. The key point is that electrolysis and chromium-based browsers can page inactive tabs "without affecting performance of the current tab."

This isn't really intuitive, though. When you switch to a tab, either you page in that tab's memory for the current process. Or you page in that tab's process and memory.

That is, by going to a "per process" approach, the amount of memory that gets paged in almost certainly went up. No?

Post reply on HN