Investigate adjusting structure sizes to amortise costs in jemalloc
Categories
(Core :: Memory Allocator, task)
Tracking
()
People
(Reporter: pbone, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sp3])
jemalloc picks run sizes based on what will fit neatly in memory without creating excess fragmentation. AFAIK there's no optimisation of avoiding slow paths like creating new runs. Would it be possible to change sizes of runs (or other structures) to amortise costs of those slow paths? Will that increase fragmentation?
See Bug 1843932
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 1•1 year ago
|
||
We can set a lower-bound on the number of cells per run. The highest lower-bound that still works (given other structure sizes) is 35. So testing that tells us the most we can possibly achieve by adjusting this, a theoretical maximum. I like to test values like this because it's a quick test if it's worth continuning or to give up. If this didn't show interesting results then nothing would. But if it is interesting then it may be worth testing more conservative values.
https://treeherder.mozilla.org/jobs?repo=try&revision=3b9351c72b815ed0d78e0db979b033e07ce957ed
Subtests look nice: https://treeherder.mozilla.org/perfherder/comparesubtest?originalProject=try&newProject=try&newRevision=3b9351c72b815ed0d78e0db979b033e07ce957ed&originalSignature=4701848&newSignature=4701848&framework=13&application=firefox&originalRevision=5a75c05ba02e98eab3e55fceecce3bec9d1187a4&page=1&showOnlyConfident=1
Windows sp3: 0.63% better, 4.27 confidence
Windows resident base: 0.86% worse, 7.72 confidence
Windows resident tp6: 1.16% worse, 1.57 confidence
But explicit memory is bad, why is it affected but not resident? Probably because of how mozjemalloc measures overhead.
Description
•