CacheLib
CacheLib copied to clipboard
NUMA bindigs support for private memory
This PR adds NUMA binding support for private memory. I tried to align the implementation with shared memory approach and introduced PrivateMemoryManager
. By current design, SlabAllocator
allocates and owns private memory but shared memory is supplied as external memory to SlabAllocator
. With this PR the memory is always supplied as external to SlabAllocator
and probably we have to clean up SlabAllocator
implementation because it is not required to own memory anymore.
Hi @therealgymmy, could you please take a look at this PR? It was opened more than a month ago.
@vinser52: apologies for the late review.
Instead of supporting this, I think we should deprecate private memory altogether. Today when a cachelib user has configued memory-monitor (where we may madvise away pages to make more memory available for the rest of the system), we will always use SHM.
This means we will just support Shm for multi-tier memory, and internally we can start moving everyone off private memory mode.
https://github.com/facebook/CacheLib/blob/main/cachelib/allocator/CacheAllocator-inl.h#L53-L54
CacheAllocator<CacheTrait>::CacheAllocator(
typename CacheAllocator<CacheTrait>::InitMemType type, Config config)
: isOnShm_{type != InitMemType::kNone ? true
: config.memMonitoringEnabled()},