Closed Bug 1368069 Opened 7 years ago Closed 7 years ago

Drop the fast GC slice budget to 5ms in Nightly

Categories

(Core :: JavaScript: GC, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1367905
Performance Impact high

People

(Reporter: sfink, Assigned: pbone)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We would like to try setting the slice duration to 5ms to see what happens. We can back it out if it causes issues.

I *think* the expected effect would be:

1. smoother operation (fewer missed frames) during the incremental marking portion. (I don't know what telemetry would indicate this, but would like to know.)

2. no effect on the mark -> sweep or other slow transition pauses. (Visible in telemetry via GC_MAX_PAUSE_MS.)

3. more long pauses from nonincremental GCs that happen because we decided we desperately needed to GC while the incremental GC was still ongoing. (Visible in telemetry via the GC_NON_INCREMENTAL proportion.)

4. slower mutator (non-GC) activity for longer periods of time while incremental collection is ongoing, having downstream effects. (Perhaps visible in benchmarks?)

So the question at hand is at what point #3 and #4 outweigh #1.
One approach to think about is what I did for the CC in bug 1304205: I increase the slice duration the longer the CC goes on, to try to avoid (3). This didn't have any visible effect on max pause in telemetry (maybe due to bad CC times being so long tail they are hard to pick out), but it did reduce the length of the 95th percentile of CCs by about a third.
Assignee: nobody → pbone
Status: NEW → ASSIGNED
Whiteboard: [qf]
Blocks: 1105706
FWIW I was about to reduce the time to 5ms too in my patches to use idle time more.
(need to fix something in TimerThread before getting back to the idle patches.)
Comment on attachment 8871934 [details] [diff] [review]
Set the minimum GC slice time to 5ms

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

It seems ok to try this out for now. I think we probably ought to implement mccr8's suggestion eventually. Olli, let us know if this is going to interfere with your idle stuff.

Requesting feedback from jonco to verify that he's ok with landing this.
Attachment #8871934 - Flags: review?(sphink)
Attachment #8871934 - Flags: review+
Attachment #8871934 - Flags: feedback?(jcoppeard)
Comment on attachment 8871934 [details] [diff] [review]
Set the minimum GC slice time to 5ms

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

How are we going to measure if this is successful / causes problems?  As long as we have a plan written down then I'm happy with trying this.
Attachment #8871934 - Flags: feedback?(jcoppeard) → feedback+
See Also: → 1368972
I filed bug 1368972 for mccr8's suggestion.
Whiteboard: [qf] → [qf:p1]
Kannan, 

Just a follow up from our QF triage last week.  Suggestion on next step to get this bug moving since Jon's filing bug 1368972 based on mccr8's suggestion.
Flags: needinfo?(kvijayan)
FWIW, same change was in my patch for bug 1367905.
And in case we use timers, the slice is at minimum pref * 2 (10ms) and max 50ms (since 50ms is max idle period)

https://hg.mozilla.org/mozilla-central/file/981da978f1f686ad024fa958c9d27d2f8acc5ad0/modules/libpref/init/all.js#l1423
Yeah, this has been obsoleted by bug 1367905, so we're good now.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(kvijayan)
Resolution: --- → DUPLICATE
Performance Impact: --- → P1
Whiteboard: [qf:p1]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: