Decommit memory less agressively when we are allocating quickly
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
People
(Reporter: jonco, Assigned: jonco)
Details
Attachments
(4 files)
Currently we always decommit newly allocated chunks until the memory is used, and decommit used chunks immediately they become empty. If we are allocating quickly we may end up recommitting the memory again very soon and this will be wasted work.
| Assignee | ||
Comment 1•4 years ago
|
||
This removes the decommit operation that happened when a chunk became empty,
and moves it to the background decommit task. The patch changes this to not
happen when we are in high frequency GC mode, and broadens the defintiion of
that to include cases when we have triggered GC to high allocation rate.
This means that empty chunks are no longer assumed to be fully decommitted.
| Assignee | ||
Comment 2•4 years ago
|
||
This is likely to be wasted effort if we allocate arenas from them shortly afterwards.
We still mark the chunk contents as decommitted as otherwise we would have to
initialize the arenas to the not allocated state which would touch every arena
in the chunk. Therefore we will still do the recommit on allocation but this
should be a no-op.
Depends on D133110
| Assignee | ||
Comment 3•4 years ago
|
||
This is no longer called. We require the GC lock for interacting with the chunk
lists even in GC so this is not required.
Depends on D133111
| Assignee | ||
Comment 5•4 years ago
|
||
Uh, looks like I forgot to call the method that decommits empty chunks.
| Assignee | ||
Comment 6•4 years ago
|
||
Earlier patches added a method to decommit empty chunks but I realised I wasn't calling it.
Comment 7•4 years ago
|
||
| bugherder | ||
Comment 9•4 years ago
|
||
| bugherder | ||
Comment 10•4 years ago
|
||
== Change summary for alert #32706 (as of Mon, 13 Dec 2021 06:05:18 GMT) ==
Improvements:
| Ratio | Test | Platform | Options | Absolute values (old vs new) |
|---|---|---|---|---|
| 6% | web-tooling-benchmark-sm | linux64-shippable | 6.42 -> 6.84 | |
| 5% | web-tooling-benchmark-sm | linux64-shippable | 6.41 -> 6.74 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=32706
Comment 11•3 years ago
|
||
(In reply to Pulsebot from comment #4)
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2564fe913797
Part 1: Don't decommit empty chunks immediately r=sfink
https://hg.mozilla.org/integration/autoland/rev/f4a23f2a7205
Part 2: Don't immediately decommit new chunks when we are allocating quickly
r=sfink
https://hg.mozilla.org/integration/autoland/rev/8315ed231d5a
Part 3: Remove unused method to wait for the background alloc task r=sfink
== Change summary for alert #32687 (as of Fri, 10 Dec 2021 09:16:22 GMT) ==
Improvements:
| Ratio | Test | Platform | Options | Absolute values (old vs new) |
|---|---|---|---|---|
| 4% | jetstream2 | linux1804-64-shippable-qr | webrender | 77.39 -> 80.85 |
| 3% | jetstream2 | windows10-64-shippable-qr | webrender | 85.26 -> 88.06 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=32687
| Assignee | ||
Updated•3 years ago
|
Description
•