What does numactl --localalloc do? Does it bind program allocation to only the single node that numactl --localalloc was run on? Or does it ensure that whenever the program allocates its given memory from its local memory?
--localalloc will force memory allocation to come from the local pool for the node the process is running on, whatever node that may be.
To force bind to a specific processor, the --physcpubind option must be specified. When used in conjunction with localalloc, it'll force a process to run on a specified node and only draw memory from that node.
--preferred tells it to allocate from a specific node if possible, but use remote memory if not.
My understanding of the documentation is that --localalloc will allocate memory on the node of the CPU that made the system call. This should work well for applications that have worker threads pinned to individual CPUs, and in conjunction with malloc libraries that keep per-thread memory pools such as TCMalloc.
--localalloc
will force memory allocation to come from the local pool for the node the process is running on, whatever node that may be.To force bind to a specific processor, the
--physcpubind
option must be specified. When used in conjunction with localalloc, it'll force a process to run on a specified node and only draw memory from that node.--preferred
tells it to allocate from a specific node if possible, but use remote memory if not.My understanding of the documentation is that
--localalloc
will allocate memory on the node of the CPU that made the system call. This should work well for applications that have worker threads pinned to individual CPUs, and in conjunction withmalloc
libraries that keep per-thread memory pools such as TCMalloc.