
Memory Usage of Firefox with e10s Enabled - XzetaU8
http://www.erahm.org/?p=22
======
arsa
Primary reason I switched back from chrome to firefox couple of years ago is
for memory usage actually - got really tired of browser eating all my ram
(with every extension and tab adding more and more usage). And no, i rarely
actually have enough free ram - it goes to better use.

I hope firefox handles this better than chrome - any fundamental differences
between sandboxing of every thread in chrome and what electrolysis is doing?

~~~
the8472
> any fundamental differences between sandboxing of every thread in chrome and
> what electrolysis is doing?

Chrome does process-per-tab more or less. Current plans for e10s are to start
with just 1 content process and see how that can be increased later.

So basically e10s does not suffer per-process-overhead as chrome does. For
now.

~~~
lucian1900
Actually, Chrome does process-per-domain. Almost always several tabs of the
same domain will share a process. You can check this by killing one process
and seeing lots of tabs go away.

~~~
justinschuh
No. We currently mostly do process-per-tab, but it gets complicated depending
on how exactly a given window/tab was opened and certain resource heuristics.
We're moving to process-per-origin[1], largely for the security improvement.
But, that's been a huge, multi-year engineering effort that's only now
approaching fruition.

[1] [https://www.chromium.org/developers/design-documents/site-
is...](https://www.chromium.org/developers/design-documents/site-isolation)

~~~
lucian1900
I see.

So the reason more than one tab will crash when killing a process is that all
those processes were sharing a resource of some sort?

------
mintplant
I had to disable e10s because whenever I switched tabs the page would
sometimes be replaced indefinitely by a white screen with a big loading
indicator. Tried it again recently and the problem was still there, but less
so.

I get that multi-process is important, but I really hope Mozilla holds off on
a wider release until performance and stability are fully ironed out.

~~~
mbrubeck
Part of the problem is that e10s Firefox by default still uses just one UI
process and one "content" process, shared by all tabs. So a web page can't
cause the UI to hang, but it can cause all other web pages to hang.

Curious testers can go to about:config and set "dom.ipc.processCount" higher
than 1 to increase the number of content processes. I suggest trying this only
in Firefox Developer Edition or Nightly, and not in your main browsing
profile, since there are still some serious bugs and active development
related to this configuration (so consider it a chance to test future
improvements, rather than something that’s ready for regular use):

[http://bugzil.la/e10s-multi](http://bugzil.la/e10s-multi)

~~~
Scarbutt
When e10 becomes the default, will the number of content processes still
default to 1?

~~~
swinglock
Yes, the conclusion of the link says so.

~~~
Excavator
Where? I don't see any such conclusion. Mind quoting the relevant bit?

~~~
Ded7xSEoPKYNsDd
> Overall we see a 10-20% increase in memory usage for the 1 content process
> case (which is what we plan on shipping initially).

------
c0l0
It'd be interesting to see if one could trim down memory consumption by making
Firefox use KSM[0] - on Linux, it's only a single madvise(2) call away.

[0]:
[https://www.kernel.org/doc/Documentation/vm/ksm.txt](https://www.kernel.org/doc/Documentation/vm/ksm.txt)

~~~
kevincox
IIUC most of the shared pages would be common when the process is forked, I
doubt there would be enough duplicate content created after the fork to be
worth it.

------
suprgeek
Linux Max - 872 MiB

Windows Max - 1,108 MiB

OSX Max - 1,694 MiB

Something Funny is happening with OSX to spike the memory usage to those
levels.

------
frik
I can't wait to use a Servo (and Rust) based multi-process browser with a lean
HTML5 UI. We wait for E10s since 2011 or so, and it still defaults to 1
process and is experimental. The whole XPCOM and XUL legacy API cruft do hurt
Firefox. Phoenix/Firebird/Firefox originally started as a lean fork of the
Mozilla Suite, with a lot of old cruft removed. Nowadays, I wish there would
be a new leaner fork, that kisses the old cruft good bye and starts fresh with
Servo and TraceMonkey.

Maybe Mozilla should refocus all resources to Servo and Rust... All what
people expect from Mozilla is a lean modern fast independent open source
browser.

~~~
ultramancool
> The whole XPCOM and XUL legacy API cruft do hurt Firefox.

I'd argue the exact opposite - that "cruft" is the reason I still use Firefox.
Extensions are so much better because they can truly have native features and
have deep access to the browser. From the native look and feel of the LastPass
extension of Firefox to basic stuff I need like sidetabs are only possible
because of this deep "legacy" API rather than the extremely limited web based
APIs everyone's pushing for these days.

Kill XPCOM and XUL and you kill the only reason I still use Firefox.

At least in the current state of things, nothing to say they won't improve the
web-style extension APIs at some point but they're really not ready yet in my
opinion, they've got a long way to go and leave a lot to be desired.

------
weaksauce
I have noticed that the browser becomes more unresponsive with videos in tabs
compared to single process Firefox. I enabled it to make my multi window, lots
of tabs workflow smoother but it seems to have the opposite effect.

~~~
cpeterso
There was a known problem with video performance with e10s, though it was
fixed two months ago (now Firefox 45 Dev Edition). The e10s sandbox
inadvertently blocked hardware video decoding.

[https://bugzilla.mozilla.org/show_bug.cgi?id=1217185](https://bugzilla.mozilla.org/show_bug.cgi?id=1217185)

~~~
weaksauce
ah, makes sense. I am on 44.0.1 right now. I'll try the dev edition, thanks!

~~~
lizzard
If you try it and run into a problem, do file a bug! Here's a bugzilla
template link:
[https://bugzilla.mozilla.org/enter_bug.cgi?format=__default_...](https://bugzilla.mozilla.org/enter_bug.cgi?format=__default__&product=Firefox&component=General&blocked=516752&short_desc=\[e10s\]%20&cc=cpeterson@mozilla.com)

------
bitmapbrother
It's going to be interesting to see how the people, ignorant about the
additional memory overhead required for a multi-process architecture, will
respond to this. My guess is that they'll find another single process browser
or revert back to the old version after they've thoroughly finished
criticizing the new Firefox version for the increased memory bloat.

~~~
pmontra
There will be no more single process browsers left.

However RAM is cheap and very useful in general. The more you have the faster
your computer seems to run. Obviously if one has already hit the RAM limit of
the motherboard and needs more, s/he's out of luck. I had a 4 GB laptop and
couldn't expand it anymore. Then I bought one with 16 GB and I can expand it
to 32 GB. I looked explicitly for that option, because I was pretty sure that
sooner or later 16 GB wouldn't be enough. I rarely hit 12 GB at the moment.

~~~
bitmapbrother
I absolutely agree with you, but that doesn't stop the people complaining
about Chrome memory bloat. The same people that consistently complain about
Chrome will now have a new browser to complain about.

