Closed Bug 1406065 Opened 3 years ago Closed 2 years ago
Harmonise GC parameters for different configurations
There are different GC parameter settings that are used for the desktop browser, mobile browser (normal and restricted RAM configurations) and the shell. We should make sure these are set to sensible values and reflect current RAM sizes.
According to snorp, the restricted RAM settings for mobile only apply to ARMv6 devices which are no longer supported.
Here's a spreadsheet showing the current settings: https://docs.google.com/a/mozilla.com/spreadsheets/d/12WbriuP1DnkvjJJiS-smj_vH4msqE1vj3aDES4nmHVY/edit?usp=sharing My main observation from this is that the settings are almost exactly the same across configurations, with the exception of JSGC_MAX_MALLOC_BYTES, which is much larger on desktop (128 MiB vs 32 MiB everywhere else).
Thanks Jon, This was something I hoped we could imporve and the spreadsheet will be very handy to find all these.
Priority: -- → P3
Patch to set the max malloc bytes parameter to 128MiB in the shell, the same as it is in the browser. This removes the "backward API compatibility"* where this parameter is set to the same value as the max bytes parameter when initialising the GCRuntime and adds a default value of 128MiB, which is what the default browser pref sets ends up setting it to. * This comment is due to bug 506125. I don't think we try that hard to preserve backward compatibility, and I don't think this change is likely to break things if we did.
Assignee: nobody → jcoppeard
Attachment #8917012 - Flags: review?(sphink)
Comment on attachment 8917012 [details] [diff] [review] bug1406065-max-malloc-bytes Review of attachment 8917012 [details] [diff] [review]: ----------------------------------------------------------------- \o/ It's a PITA to trace through what these settings are and what they mean. Any simplification is welcome. ::: modules/libpref/init/all.js @@ +1457,5 @@ > // js/src/jsgc.cpp. They're documented in js/src/jsapi.h. > > // JSGC_MAX_MALLOC_BYTES > +// This preference determines the rate at which GCs are triggered by > +// malloc memory allocation. Can you add in a mention of the units, somehow? Maybe ", in MB" is enough, or if you want to be fully explicit, "the units are in megabytes of allocations, ignoring frees" or something.
Attachment #8917012 - Flags: review?(sphink) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b895364379c6 Make JSGC_MAX_MALLOC_BYTES param the same in the shell as the browser r=sfink
I'm not sure what else I intended to do in this bug. If I remember I'll file a new one.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.