3 ms·
Much of that is well addressed by one allocator arena per cpu, and either pinning threads to cpus or at least having a high threshold to move threads across NUM
by toast0 1y ago
Much of that is well addressed by one allocator arena per cpu, and either pinning threads to cpus or at least having a high threshold to move threads across NUMA boundaries.
If you have a lot of cross thread memory use, maybe you need something to help with allocate on core X, free on core Y and the cross core communication that causes (maybe that's already in place?).
There's more memory overhead that way, but large core count systems tend to have a lot of memory too.
- masklinn 1y ago> Much of that is well addressed by one allocator arena per cpu, and either pinning threads to cpus or at least having a high threshold to move threads across NUMA boundaries. Note that that can have an awkward effect: if the thread gets parked (either entirely, or just stops calling the allocator because it has reached its steady state), the allocator may never have the opportunity to release that thread's memory. IIRC mimalloc suffers from this issue, you need to call an allocator specific API to tell it about the regime change.