Bug 1532838 - Set minimum nursery size to 256KB r=jonco
authorPaul Bone <pbone@mozilla.com>
Mon, 06 May 2019 03:16:06 +0000
changeset 531462 2509defe2779464cd2df4c211decf32e5be37909
parent 531461 fbf69131cbda3adc802180e60c14fc6700cb2d90
child 531463 dcdecf563747b29b8bd7270937d190e967b3ea50
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1532838
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1532838 - Set minimum nursery size to 256KB r=jonco Differential Revision: https://phabricator.services.mozilla.com/D29816
js/src/gc/GC.cpp
modules/libpref/init/all.js
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -284,20 +284,21 @@ namespace TuningDefaults {
 static const size_t GCZoneAllocThresholdBase = 30 * 1024 * 1024;
 
 /* JSGC_MAX_MALLOC_BYTES */
 static const size_t MaxMallocBytes = 128 * 1024 * 1024;
 
 /*
  * JSGC_MIN_NURSERY_BYTES
  *
- * 192K is conservative, not too low that root marking dominates. The Limit
- * should be a multiple of Nursery::SubChunkStep.
+ * With some testing (Bug 1532838) we increased this to 256K from 192K
+ * which improves performance.  We should try to reduce this for background
+ * tabs.
  */
-static const size_t GCMinNurseryBytes = 192 * 1024;
+static const size_t GCMinNurseryBytes = 256 * 1024;
 
 /* JSGC_ALLOCATION_THRESHOLD_FACTOR */
 static const float AllocThresholdFactor = 0.9f;
 
 /* JSGC_ALLOCATION_THRESHOLD_FACTOR_AVOID_INTERRUPT */
 static const float AllocThresholdFactorAvoidInterrupt = 0.9f;
 
 /* no parameter */
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1476,20 +1476,20 @@ pref("javascript.options.mem.high_water_
 
 // JSGC_MAX_BYTES
 // SpiderMonkey defaults to 2^32-1 bytes, but this is measured in MB so that
 // cannot be represented directly in order to show it in about:config.
 pref("javascript.options.mem.max", -1);
 
 // JSGC_MIN_NURSERY_BYTES / JSGC_MAX_NURSERY_BYTES
 #if defined(ANDROID) || defined(XP_IOS)
-pref("javascript.options.mem.nursery.min_kb", 192);
+pref("javascript.options.mem.nursery.min_kb", 256);
 pref("javascript.options.mem.nursery.max_kb", 4096);
 #else
-pref("javascript.options.mem.nursery.min_kb", 192);
+pref("javascript.options.mem.nursery.min_kb", 256);
 pref("javascript.options.mem.nursery.max_kb", 16384);
 #endif
 
 // JSGC_MODE
 pref("javascript.options.mem.gc_per_zone", true);
 pref("javascript.options.mem.gc_incremental", true);
 
 // JSGC_SLICE_TIME_BUDGET