Closed Bug 963844 Opened 11 years ago Closed 11 years ago

Run ICC more aggressively when there's a lot of activity

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file, 2 obsolete files)

I think this is needed to avoid getting timeouts on Mochitest-BC. One thing I've tried out which seems to work fairly well in local testing is to scale the slice budget by the % amount we've fallen behind our target for scheduling slices. For example, we try to run 10ms slices every 32ms. If we end up spending 64ms between two slices instead, then we'll budget 20ms of ICC work. That way we're doing a roughly constant amount of CC work per unit of wall clock time.
Well, with that, it is only failing 50% of the time, and both failures are on a single test, so that's an improvement.
Depends on: 979047
If we exceed the desired length of time between ICC slices, proportionally scale up the slice budget to try to ensure a constant amount of collection work is done per unit of time, even when the browser is under heavy load. As part of this, track the time the last slice from the current ICC ended. https://tbpl.mozilla.org/?tree=Try&rev=1e1b69edc562
Attachment #8365407 - Attachment is obsolete: true
Attachment #8385735 - Flags: review?(bugs)
Earlier, I had some kind of threshold for the scaling factor, and if you fell below that threshold, you'd just do the regular slice time, but that seems overly complex at this point. Maybe later it will be worthwhile doing that kind of tuning.
Comment on attachment 8385735 [details] [diff] [review] Scale ICC budget by time between slices. r=smaug Rename ICCSliceTime to CollectCycleCollectionSlice or some such and call nsCycleCollector_collectSlice inside that method using the value you get using the algorithm in this patch? I think the patch as such is a bit too confusing - at least to understand at 3:30am.
Attachment #8385735 - Flags: review?(bugs) → review-
Attachment #8385735 - Attachment is obsolete: true
Attachment #8386881 - Flags: review?(bugs)
Comment on attachment 8386881 [details] [diff] [review] Scale ICC budget by time between slices. >+ // Only run a limited slice if we're within the max running time. >+ if (TimeBetween(gCCStats.mBeginTime, now) < kMaxICCDuration) { >+ float sliceMultiplier = TimeBetween(gCCStats.mEndSliceTime, now) / kICCIntersliceDelay; Can you add some max(sliceMultiplier, 1) thing here.
Attachment #8386881 - Flags: review?(bugs) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: