Harmonise GC parameters for different configurations

RESOLVED FIXED

Status

()

enhancement
P3
normal
RESOLVED FIXED
2 years ago
Last year

People

(Reporter: jonco, Assigned: jonco)

Tracking

(Blocks 1 bug)

55 Branch
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Assignee

Description

2 years ago
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.
Assignee

Comment 1

2 years ago
According to snorp, the restricted RAM settings for mobile only apply to ARMv6 devices which are no longer supported.
Assignee

Comment 2

2 years ago
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.
Blocks: 1371162
Priority: -- → P3
Assignee

Updated

2 years ago
Depends on: 1406962
Assignee

Comment 4

2 years ago
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+

Comment 6

2 years ago
Pushed by jcoppeard@mozilla.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
Assignee

Updated

2 years ago
Keywords: leave-open
Assignee

Comment 8

Last year
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: Last year
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.