Use MADV_FREE_REUSABLE on macos
Categories
(Core :: JavaScript: GC, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: pbone, Assigned: pbone)
References
Details
(Keywords: memory-footprint, perf, Whiteboard: [MemShrink?])
Attachments
(1 file)
On MacOS we use MADV_FREE to discard pages we're not interested in. MacOS continues to keep these pages around until there's memory pressure. However it also counts them against our process's resident set size (RSS). While it's true that they are resident pages in memory that belong to our process. When RSS is used to measure Firefox is using it's inaccurate, Firefox isn't "using" this memory, the OS could reclaim it.
MacOS adds MADV_FREE_REUSABLE which has the same behavour as MADV_FREE except that it doesn't count these pages towards RSS.
Assignee | ||
Comment 1•5 years ago
|
||
On MacOS this is the same as MADV_FREE except the pages are not counted in
RSS.
Assignee | ||
Comment 3•5 years ago
•
|
||
Hi perfherders, I'm expecting a positive (good, less memory) change in resident memory size on MacOS.
Comment 4•5 years ago
|
||
bugherder |
Comment 5•5 years ago
|
||
(In reply to Paul Bone [:pbone] from comment #3)
Hi perfherders, I'm expecting a positive (good, less memory) change in resident memory size on MacOS.
Thank you for the heads up!
Comment 6•5 years ago
|
||
== Change summary for alert #22205 (as of Wed, 31 Jul 2019 10:12:36 GMT) ==
Improvements:
19% Resident Memory macosx1014-64-shippable opt stylo tp6 722,374,519.19 -> 585,866,731.01
13% Base Content Resident Unique Memory macosx1014-64-shippable opt 28,159,488.00 -> 24,413,354.67
13% Base Content Resident Unique Memory macosx1014-64-shippable opt 28,324,437.33 -> 24,642,901.33
7% Resident Memory macosx1014-64-shippable opt 588,158,641.40 -> 546,123,886.48
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=22205
Description
•