Open Bug 1444013 Opened 3 years ago Updated 2 years ago

The collector should yield after nursery collection if the budget is exceeded

Categories

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

enhancement

Tracking

()

ASSIGNED

People

(Reporter: pbone, Assigned: pbone)

References

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

Details

(Whiteboard: [qf:p3])

Attachments

(1 file)

If during a collection slice, nursery collection exceeds the budget (or maybe comes within 90% of it), the collection should yield without attempting any tenured heap collection.

Even if this means re-doing a minor collection on the next slice.

I just saw a minor collection take 25ms, and the the root marking and some of the tenured heap marking took a further 11ms.  Consuming 36ms in a 15ms budget.  Since we do not yet incrementalize root marking we may get an easy win by yielding here.

I'd like to do this after my patches to do nursery collection less often.
Priority: -- → P3
(In reply to Paul Bone [:pbone] from comment #0)
Oh, good idea.

> I just saw a minor collection take 25ms

Ouch, that's pretty bad.
Note that we could get into a situtation where the GC makes no progress because
we're always exceeding the budget, this is fairly unlikely but someone could get unlucky (it'd result in a non-icremental collection).  In that case it'd be best
to decrese the trigger for the GC when we hit this condition, so the following GC
occurs sooner and the nursery is not so full.

I also have Bug 1397549 for decreasing the nursery size if nursery collection takes too long, it could be linked with this condition.
Assignee: nobody → pbone
Status: NEW → ASSIGNED
Attachment #9011670 - Flags: review?(sphink)
Comment on attachment 9011670 [details] [diff] [review]
Bug 1444013 - End the slice if nursery collection took too long

Review of attachment 9011670 [details] [diff] [review]:
-----------------------------------------------------------------

Makes sense.
Attachment #9011670 - Flags: review?(sphink) → review+
Pushed by pbone@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/92cde451be94
End the slice if nursery collection took too long r=sfink
I'm assuming that this test is timing out because the nursery collections take too long and it makes no GC progress.  I'll leave this bug open and revisit it after Bug 1397549
Depends on: 1397549
Flags: needinfo?(pbone)
Whiteboard: [qf]
Whiteboard: [qf] → [qf:p3:f67]
Whiteboard: [qf:p3:f67] → [qf:p3]
Blocks: 1507440
You need to log in before you can comment on or make changes to this bug.