Closed Bug 1579426 Opened 7 months ago Closed 7 months ago

Reduce the number of long running GCs by increasing the slice budget over time

Categories

(Core :: JavaScript: GC, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file)

Long running incremental GCs can block script parsing (if we're collecting the atoms zone) which seems to be a problem in bug 1543776.

We can increase the slice budget for collections that take more then a certain length of time or number of slices to make them finish sooner.

We should aim that all incremental GCs complete in under 2 seconds and under 50 slices.

(In reply to Jon Coppeard (:jonco) from comment #0)
From current telemetry, ~97% of GCs finish in less than 2 seconds and ~99% of GCs finish in under 50 slices.

Speculative review request as I'm still running performance tests.

This calculates a minimum budget for incremental GCs by using linear interpolation based on the length of time the collection has been running and the number of slices it has taken so far. The aim is to finish collectins in under 2 seconds and 50 slices.

Might want to think whether the patch here could be used to implement what was done in https://bugzilla.mozilla.org/show_bug.cgi?id=1368972
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1543776#c23
But that all is something for a followup I guess.

(In reply to Olli Pettay [:smaug] from comment #3)
Yes, this would probably make that patch redundant.

Surprisingly, performance tests show no significant changes with this patch.

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7ade202cf20b
Increase slice buget for long running collections to limit total length of collection r=sfink
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Regressions: 1593270
You need to log in before you can comment on or make changes to this bug.