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


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




Tracking Status
firefox71 --- fixed


(Reporter: jonco, Assigned: jonco)


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



(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
See also
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
Increase slice buget for long running collections to limit total length of collection r=sfink
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.