Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

Customizing the scalable allocator

danhook
Beginner
323 Views
I'm using the scalable allocator in an HPC (IA64) environment and I think I would get better performance if the allocator was calling mmap less frequently with larger block sizes, even if this would involve consuming more memory. What constants should I change in order to achieve this? It seems like at the very least I should increase minLargeObjectSize. Anything else?
0 Kudos
3 Replies
RafSchietekat
Valued Contributor III
323 Views
Don't touch minLargeObjectSize... :-)

Instead, have a look at memReqSize.
0 Kudos
RafSchietekat
Valued Contributor III
323 Views
With regard to a question in "scalable_allocator segfault", also please don't touch blockSize (in the current version), because it is not an independent setting. Making changes in this code requires care and attention to details.

It may be possible to independently resize BackRefMaster::bytes, but I don't know.
0 Kudos
Alexey-Kukanov
Employee
323 Views
How big are "larger block sizes"? Important thresholds are 8K and 8M. Depending on where the problematic sizes fall, tuning will be different.

Regarding 256G limit you asked in another thread: it was calculated for a close-to-worst case of most allocations fitting into 16K. If most allocations are larger than that, the limit will be higher too. For example, if you only requested 1M blocks, the limit would be multiplied to 64 (==1M/16K), approaching 16 terabytes.
0 Kudos
Reply