Run a command on node 0 with memory allocated on node 0 and 1

numactl

  • Control NUMA policy for processes or shared memory.
    More information: <https://man7.org/linux/man-pages/man8/numactl.8.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

numactl --cpunodebind={{0}} --membind={{0,1}} -- {{command}} {{command_arguments}}

click the source code to copy install numactl on any operating system with command-not-found.com