Expand description
NUMA-Aware Memory Allocation
This module provides NUMA-aware memory allocation for multi-socket systems. Proper NUMA placement can provide 2-4× improvement on multi-socket systems.
§Problem
Default allocators ignore NUMA topology:
- Memory may be allocated on remote NUMA node
- Cross-socket access: ~100ns latency vs ~70ns local
- Bandwidth: ~40GB/s local vs ~20GB/s remote
§Solution
- Detect NUMA topology at startup
- Allocate memory on specific NUMA nodes
- Pre-fault pages to materialize allocations
- Pin threads to match memory placement
§Usage
ⓘ
let alloc = NumaAllocator::new()?;
let buffer = alloc.allocate_on_node(1024 * 1024, 0)?; // 1MB on node 0
alloc.prefault(&buffer); // Touch all pagesStructs§
- Numa
Allocator - NUMA-aware allocator.
- Numa
Buffer - NUMA-aware memory buffer.
- Numa
Topology - NUMA topology information.
- Numa
Vector Storage - NUMA-aware vector storage.
- Thread
Pinner - Thread pinning utilities.
Enums§
- Allocation
Strategy - NUMA-local allocation strategy.
- Numa
Error - NUMA allocation errors.
Type Aliases§
- Numa
Node - NUMA node identifier.
- Numa
Result - Result type for NUMA operations.