On 05/05/2015 12:42 AM, Nicholas Nethercote wrote:
On Mon, May 4, 2015 at 11:53 PM, Leman Bennett (Omega X)
<Redacted.For.Spam@request.contact> wrote:
I heard that there was rumor of a plan to limit process count spawn to
per-domain. But I've not seen offhand of a bug filed for it or anything else
that relates to achieving more than one content process instance.
There are multiple competing factors when it comes to choosing the
right number of processes.

- For security, more processes is better; one per tab is probably ideal.

- For crash protection, ditto.

- For responsiveness, one process per CPU core is probably best.

I'm not so sure of that. Fewer processes than #CPUs will underutilize compute resources, but matching processes to cores doesn't guarantee that half those processes won't end up waiting on I/O. It's nice to have a few extra processes to time-slice in so that they can make progress when another process blocks on. (Then again, if there are worker threads in the mix, they may or may not eat a core themselves...) That's more of a throughput argument than a responsiveness one, but it can impact responsiveness if the one tab you care about ends up waiting on something else in the same process that could have been split out.

Having more processes exposes more parallelism to where the scheduler can see it.

(At the cost of memory, security, and crashes, as you said, as well as scheduler and locking overhead, cache thrashing, etc.)


- For memory usage, one process is probably best.

I'd be loathe to use as many processes as Chrome does, which is
something like one per domain (AIUI). I've heard countless times that
Chrome basically falls over once you get past 60 or 70 tabs, and I've
always assumed that this is due to memory usage, or possibly some kind
of IPC scaling issue. In contrast, plenty of Firefox users have 100+
tabs, and there are some that even have 1000+. I think it's crucial
that we continue working well for such users.

With all that in mind, my hope/guess is that we'll end up one day with
one process per CPU core, because it's the middle ground.

Nick
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to