Skip to content

Commit 38f8a07

Browse files
committed
Bug 1868530 - Lower parallel marking thresholds following recent improvements r=sfink
These thresholds were chosen based on local benchmarking results. In general all macOS systems I've tested perform great and the 4MB threshold is because none of the benchmarks I used have a heap smaller than that. Recent Windows and Linux results are also better than previously although not as good as macOS. I haven't done any more Android benchmarking recently so I'm using the same value as for Linux. We're not going to enable this on Android without specific performance work there first. For reference, according to telemetry about 10% of our GCs have < 1MB heap size (the minimum size captured by telemetry). A 4MB threshold excludes 11.4% of GCs, 8MB 14.3% and 16MB 24% of GCs. Differential Revision: https://phabricator.services.mozilla.com/D195629
1 parent 27bac7a commit 38f8a07

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

js/src/gc/Scheduling.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@
519519
* JSGC_PARALLEL_MARKING_THRESHOLD_MB \
520520
*/ \
521521
_(JSGC_PARALLEL_MARKING_THRESHOLD_MB, size_t, parallelMarkingThresholdBytes, \
522-
ConvertMB, NoCheck, 10 * 1024 * 1024)
522+
ConvertMB, NoCheck, 4 * 1024 * 1024)
523523

524524
namespace js {
525525

modules/libpref/init/all.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -957,13 +957,13 @@ pref("javascript.options.mem.gc_parallel_marking", false);
957957
// JSGC_PARALLEL_MARKING_THRESHOLD_MB
958958
// Minimum heap size at which to use parallel marking, if enabled.
959959
#if defined(XP_WIN)
960-
pref("javascript.options.mem.gc_parallel_marking_threshold_mb", 20);
960+
pref("javascript.options.mem.gc_parallel_marking_threshold_mb", 8);
961961
#elif defined(XP_MACOSX)
962962
pref("javascript.options.mem.gc_parallel_marking_threshold_mb", 4);
963963
#elif defined(ANDROID)
964-
pref("javascript.options.mem.gc_parallel_marking_threshold_mb", 200);
964+
pref("javascript.options.mem.gc_parallel_marking_threshold_mb", 16);
965965
#elif defined(XP_UNIX)
966-
pref("javascript.options.mem.gc_parallel_marking_threshold_mb", 200);
966+
pref("javascript.options.mem.gc_parallel_marking_threshold_mb", 16);
967967
#endif
968968

969969
// JSGC_HIGH_FREQUENCY_TIME_LIMIT

0 commit comments

Comments
 (0)