Closed Bug 1725357 Opened 3 years ago Closed 3 years ago

Use the same GC threshold regardless of whether the last GC was a shrinking GC

Categories

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

task

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

Currently we change the way we calculate the heap size threshold for zones based on the kind of the last GC. If it was a normal GC then we clamp the current heap size input to a minimum value. With default settings this means we never automatically trigger a GC when the heap size is less than ~35MB.

If the previous GC was a shrinking GC however then we use a different minimum which has the effect of allowing the threshold to be much smaller, potentially as small as 1MB. Subsequent non-shrinking GCs are not affected and the threshold will return to its usual size.

I don't think this has much benefit. It doesn't result in us reclaiming any more memory, only potentially performing GC sooner immediately after a shrinking GC. I think we should remove this feature and simplify the threshold calculation.

This removes the condition from GCHeapThreshold::computeZoneTriggerBytes.

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cf0e21d1c16f
Use the same GC threshold regardless of whether the last GC was a shrinking GC r=sfink
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

== Change summary for alert #30961 (as of Wed, 18 Aug 2021 10:24:51 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
32% facebook ContentfulSpeedIndex android-hw-g5-7-0-arm7-shippable-qr warm webrender 917.88 -> 627.42
31% facebook ContentfulSpeedIndex android-hw-g5-7-0-arm7-shippable-qr warm webrender 918.08 -> 633.42
11% facebook dcf android-hw-g5-7-0-arm7-shippable-qr warm webrender 639.88 -> 572.17
10% facebook FirstVisualChange android-hw-g5-7-0-arm7-shippable-qr warm webrender 677.83 -> 606.83
10% facebook fcp android-hw-g5-7-0-arm7-shippable-qr warm webrender 656.79 -> 589.83
... ... ... ... ...
3% facebook-cristiano loadtime android-hw-g5-7-0-arm7-shippable-qr warm webrender 1,552.65 -> 1,499.25

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=30961

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: