Reputation: 429
When using numactl in Linux with the --membind option, let's say I do the following:
numactl --membind=0,1,2 ./prog
Will the memory for ./prog be allocated on all of NUMA nodes 0, 1, and 2? Or will the memory be allocated only on NUMA nodes 1 and 2 if NUMA node 0's memory is not enough? Thanks.
Upvotes: 2
Views: 5603
Reputation: 9028
The manpage for numactl
says :
--membind=nodes, -m nodes
Only allocate memory from nodes. Allocation will fail when there is not enough
memory available on these nodes.
So, if node 0 does not have enough memory, the memory will be allocated on the nodes 1,2. The actual ration of memory allocated per each node probably depends on the memory placement policy.
Upvotes: 1