Numa Control: numactl

From Define Wiki
Revision as of 21:19, 9 June 2014 by David (talk | contribs) (Created page with "numactl runs processes with a specific NUMA scheduling or memory placement policy. The policy is set for command and inherited by all of its children. == Show the avail...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

numactl runs processes with a specific NUMA scheduling or memory placement policy. The policy is set for command and inherited by all of its children.

Show the available numa nodes

[root@mcs ~]# numactl --hardware
available: 2 nodes (0-1)
node 0 cpus: 0 1 2 3 4 5 6 7 16 17 18 19 20 21 22 23
node 0 size: 65500 MB
node 0 free: 57709 MB
node 1 cpus: 8 9 10 11 12 13 14 15 24 25 26 27 28 29 30 31
node 1 size: 65536 MB
node 1 free: 59780 MB
node distances:
node   0   1 
  0:  10  21 
  1:  21  10

Show the numa policies

[root@mcs ~]# numactl --show 
policy: default
preferred node: current
physcpubind: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 
cpubind: 0 1 
nodebind: 0 1 
membind: 0 1

Bind to a CPU socket

  time numactl --cpubind=0 --membind=0 rpmbuild -ba kernel.spec