Closed Bug 1066789 Opened 10 years ago Closed 3 years ago

Implement a heuristic to replace dom.ipc.processCount

Categories

(Core :: DOM: Content Processes, enhancement, P3)

enhancement

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: ted, Unassigned)

References

Details

(4 keywords, Whiteboard: e10s-multi:+)

Currently to get more than one content process you set dom.ipc.processCount to a number >1 and we create a new process for each tab until we create that many processes.

We should have a heuristic based on the total memory and cpu cores available in the user's machine that we can use to replace this for desktop. I suggest something like:
processCount = min(availableMemory / kPerProcessMemoryOverhead, availableCPUCores * kMaxProcessesPerCore)

Where availableMemory and availableCPUCores are derived from system information, and kPerProcessMemoryOverhead and kMaxProcessesPerCore are constants that we decide on.

b2g wants this to be "unlimited":
http://hg.mozilla.org/mozilla-central/annotate/6a8b7740dc53/b2g/app/b2g.js#l420

so we either need to provide them an opt-out, or make this a special-case, by having dom.ipc.processCount==0 enable this heuristic.
Severity: normal → major
Has Regression Range: --- → irrelevant
Has STR: --- → irrelevant
Keywords: feature, perf, power, topperf
Whiteboard: e10s-multi:+
Priority: -- → P3
will there be an option to disable this and just use a user value, ipc =1 is what works on my machine , anything above it kills the performance on my dual core
(In reply to shellye from comment #3)
> will there be an option to disable this and just use a user value, ipc =1 is
> what works on my machine , anything above it kills the performance on my
> dual core

Yes.
FWIW in Tails we had to decrease dom.ipc.processCount to 2 on systems with less than 3GB of RAM when upgrading to Tor Browser 8 i.e. Firefox 60 ESR, due to increased memory usage that was excessive for lower-spec'ed systems.
(In reply to intrigeri from comment #5)
> FWIW in Tails we had to decrease dom.ipc.processCount to 2 on systems with
> less than 3GB of RAM when upgrading to Tor Browser 8 i.e. Firefox 60 ESR,
> due to increased memory usage that was excessive for lower-spec'ed systems.

Tell me about it. With a 48 limit I sometimes get 20+ gigabytes freed when I close a bunch of tabs.
Type: defect → enhancement
QA Whiteboard: qa-not-actionable

Hi Olli, is this still relevant post-e10s and post-fission ?

Flags: needinfo?(bugs)

Fission changes this all, no need to track this.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(bugs)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.