Try to decommit unused part of nursery chunks
Categories
(Core :: JavaScript: GC, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: pbone, Assigned: pbone)
References
(Blocks 1 open bug)
Details
(Keywords: memory-footprint, Whiteboard: [MemShrink:P1])
Attachments
(4 files)
After Bug 1433007 lands the nursery will be able to use fractions of a chunk. This allows us to decommit the parts of a chunk that we're not using.
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Comment 1•5 years ago
|
||
Paul, is this still relevant? I know some work landed already about reducing the size of the nursery.
Assignee | ||
Comment 2•5 years ago
|
||
Yep. it's all related.
I'll summarise but let me know if you need more info.
Bug 1433007 allows the nursery to use less than 1MB, but that memory is not released to the OS, it's just not actively used by JS or anything else.
This bug proposes to decommit that memory, releasing the physical RAM to the OS.
Bug 1499570 landed yesterday and decommits whole chunks as the nursery releases them. It's a separate case of where we can handle memory better, but related because it involved decommitting memory & the JS Nursery.
Assignee | ||
Comment 3•5 years ago
|
||
This class will not just decommit whole chunks, so rename it to not imply
that as much.
Assignee | ||
Comment 4•5 years ago
|
||
This refactoring is required for the next change.
Depends on D35589
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D35590
Assignee | ||
Comment 6•5 years ago
|
||
Hrm, here's a try build but it doesn't have the expected change. I'll look for bugs later:
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D35590
Updated•5 years ago
|
Pushed by pbone@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/78a0e74fae92 (part 1) Rename NurseryDecommitChunkTask r=jonco https://hg.mozilla.org/integration/autoland/rev/2d990d87e35b (part 2) Refactor how the NurseryDecomitter finishes r=jonco https://hg.mozilla.org/integration/autoland/rev/f381dc55a8bc (part 3) Re-initalise memory regions when growing the nursery r=jonco https://hg.mozilla.org/integration/autoland/rev/fbfcb9fbf6c5 (part 4) Decommit unused portion of Nursery chunks r=jonco
Assignee | ||
Comment 9•5 years ago
|
||
Hi perfherders.
Hopefully this will drop minimum resident memory by 768K.
Thanks.
Comment 10•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/78a0e74fae92
https://hg.mozilla.org/mozilla-central/rev/2d990d87e35b
https://hg.mozilla.org/mozilla-central/rev/f381dc55a8bc
https://hg.mozilla.org/mozilla-central/rev/fbfcb9fbf6c5
Comment 11•5 years ago
|
||
Paul, it looks like this showed an improvement on Linux but not other platforms. Is it possible the decommit logic isn't doing the right thing on other platforms, or are we only expecting this to work on Linux?
There does appear to be a difference in logic of SpiderMonkey's decommit and mozjemalloc's decommit (VirtualAlloc
vs VirtualFree
). This might be intentional or the term decommit might not even mean the same thing in these contexts.
Updated•5 years ago
|
Assignee | ||
Comment 12•5 years ago
|
||
Thanks erahm,
I was expecting this to be cross platform because I assumed that code "just worked". I've filed Bug 1564674.
Comment 13•5 years ago
|
||
(In reply to Eric Rahm [:erahm] from comment #11)
the term decommit might not even mean the same thing in these contexts
Indeed, we use the term decommit to mean something else here. This is arguably a bug itself.
Comment 14•5 years ago
|
||
(In reply to Paul Bone [:pbone] from comment #9)
Hi perfherders.
Hopefully this will drop minimum resident memory by 768K.
Thanks.
Thanks for the heads up!
Description
•