Closed Bug 1892242 Opened 2 months ago Closed 2 months ago

Increase maximum nursery size to 64MB

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: denispal, Assigned: denispal)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(2 files)

Increasing the maximum nursery size helps improve sp3 by about 1-2%, and a recent experiment showed no significant regressions in the wild related to collection times or jank.

Severity: -- → N/A
Priority: -- → P3
Blocks: speedometer3
Pushed by dpalmeiro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/350af7271fad
Increase maximum nursery size to 64MB. r=jonco

Backed out for causing SM bustages in testGCOutOfMemory.cpp.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | testGCOutOfMemory | /builds/worker/checkouts/gecko/js/src/jsapi-tests/testGCOutOfMemory.cpp:55:(function() { var array = []; for (var i = max >> 2; i != 0;) { --i; array.push({}); }})(); -- out of memory
Flags: needinfo?(dpalmeiro)

Looks like there might be a slight complication between zeal mode and the testGCOutOfMemory test during initialization. During the test, we initialize the GC with a 4MB heap and use the DefaultNurseryMaxBytes value (which is now 64MB) for the initial nursery size since zeal mode is set. Then after initializing the JSContext, the test sets the max nursery size to 1MB and unsets the GenerationalGC zeal mode. This kicks off a minorGC to evict the nursery, but we only clear the zeal mode after the minorGC so the nursery never gets resized and we're left with a 64MB nursery size.

The test then allocates until oom and stores the max value, performs a major GC which does resize the nursery back to a 1MB max which was set by the test, and then tries to allocate another max/4 objects expecting success. However, our heap size at this point is only 4MB and we're trying to allocate 16MB of data so we go oom.

A simple fix here is to just reset the nursery capacity when leaving zeal mode, ensuring that any changes in the min or max nursery size the test has set is respected.

Flags: needinfo?(dpalmeiro)
Pushed by dpalmeiro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9924129a7a07
Increase maximum nursery size to 64MB. r=jonco
https://hg.mozilla.org/integration/autoland/rev/a3ad3d387edd
Reset the nursery size when leaving zeal mode. r=jonco
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch

On AWFY-SP2.1, this has improved and regressed many benchmarks, with the net result being no major change in the overall SP2 score (atleast none that i could detect). Some examples of changes in the sub-benchmarks are:

Improvements:

13% on AngularJS-TodoMVC/CompletingAllItems
9% on EmberJS-TodoMVC/CompletingAllItems
5%-7% on Inferno-TodoMVC/CompletingAllItems
3% on React-Redux-TodoMVC
4%-6% on React-TodoMVC/CompletingAllItems

Regressions:
7% on AngularJS-TodoMVC/DeletingAllItems
5% on EmberJS-Debug-TodoMVC/CompletingAllItems

Lots of Improvements and regression on AWFY-Jetstream2 (but looks like the overall score hasnt changed much)
23% on OfflineAssembler-Average
6% on acorn-wtb-Average
And many more improvements on Jetstream2, and some regressions.

There is a 8.7% improvement on SP3-Charts-chartjs on autoland windows

23% regression on Ares6-Air_averageWorstCase

Whiteboard: [sp3]

In general, the "worst" timings have become worse, and the "best" timings have improved with this patch.

Regressions: 1895464
See Also: → 1849969
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: