numactl man page on CentOS

Man page or keyword search:  
man Server   8420 pages
apropos Keyword Search (all sections)
Output format
CentOS logo
[printable version]

NUMACTL(8)		 Linux Administrator's Manual		    NUMACTL(8)

NAME
       numactl - Control NUMA policy for processes or shared memory

SYNOPSIS
       numactl [ --interleave nodes ] [ --preferred node ] [ --membind nodes ]
       [ --cpunodebind nodes ] [ --physcpubind cpus ] [ --localalloc ] command
       {arguments ...}
       numactl --show
       numactl --hardware
       numactl	[  --huge  ] [ --offset offset ] [ --mode shmmode ] [ --length
       length ] [ --strict ]
       --shmid id | --shm shmkeyfile | --file tmpfsfile
       [ --touch ] [ --dump ] memory policy

DESCRIPTION
       numactl runs processes with a specific NUMA scheduling or memory place‐
       ment policy.  The policy is set for command and inherited by all of its
       children.  In addition it can set persistent policy for	shared	memory
       segments or files.

       Policy settings are:

       --interleave=nodes, -i nodes
	      Set  an memory interleave policy. Memory will be allocated using
	      round robin on nodes.  When memory cannot be  allocated  on  the
	      current interleave target fall back to other nodes.

       --membind=nodes, -m nodes
	      Only  allocate  memory  from  nodes.   Allocation will fail when
	      there is not enough memory available on these nodes.

       --cpunodebind=nodes, -N nodes
	      Only execute process on the CPUs of nodes.  Note that nodes  may
	      consist of multiple CPUs.

       --physcpubind=cpus, -C cpus
	      Only execute process on cpus.  This accepts physical cpu numbers
	      as shown in the processor fields of /proc/cpuinfo.

       --localalloc, -l
	      Do always local allocation on the current node.

       --preferred=node
	      Preferably allocate memory on node,  but	if  memory  cannot  be
	      allocated	 there	fall  back  to other nodes.  This option takes
	      only a single node number.

       --show, -s
	      Show NUMA policy settings of the current process.

       --hardware, -H
	      Show inventory of available nodes on the system.

       Numactl can set up policy for a SYSV shared memory segment or a file in
       shmfs/hugetlbfs.

       This  policy  is	 persistent and will be used by all mappings from that
       shared memory. The order of options matters  here.   The	 specification
       must  at	 least include either of --shm, --shmid, --file to specify the
       shared memory segment or file and a memory policy like described	 above
       ( --interleave, --localalloc, --prefered, --membind ).

       --huge
       When  creating a SYSV shared memory segment use huge pages.  Only valid
       before --shmid or --shm

       --offset
       Specify offset into the shared memory segment. Default 0.  Valid	 units
       are m (for MB), g (for GB), k (for KB), otherwise it specifies bytes.

       --strict
       Give  an	 error	when  a page in the policied area in the shared memory
       segment already was faulted in with a conflicting policy. Default is to
       silently ignore this.

       --mode shmmode
       Only  valid  before --shmid or --shm When creating a shared memory seg‐
       ment set it to numeric mode shmmode.

       --length length
       Apply policy to length range in the shared memory segment or  make  the
       segment	length	long  Default  is to use the remaining length Required
       when a shared memory segment is created and specifies the length of the
       new  segment  then. Valid units are m (for MB), g (for GB), k (for KB),
       otherwise it specifies bytes.

       --shmid id
       Create or use an shared memory segment with numeric ID id

       --shm shmkeyfile
       Create or use an shared memory segment, with  the  ID  generated	 using
       ftok(3) from shmkeyfile

       --file tmpfsfile
       Set policy for a file in tmpfs or hugetlbfs

       --touch
       Touch  pages to enforce policy early. Default is to not touch them, the
       policy is applied when an applications maps and accesses a page.

       --dump
       Dump policy in the specified range.

       Valid node specifiers

       all		   All nodes
       number		   Node number
       number1{,number2}   Node number1 and Node number2
       number1-number2	   Nodes from number1 to number2
       ! nodes		   Invert selection of the following specification.

EXAMPLES
       numactl --interleave=all bigdatabase arguments Run  big	database  with
       its memory interleaved on all CPUs.

       numactl	--cpubind=0--membind=0,1  process  Run	process on node 0 with
       memory allocated on node 0 and 1.

       numactl --preferred=1 numactl --show Set preferred node 1 and show  the
       resulting state.

       numactl --interleave=all --shmkeyfile /tmp/shmkey Interleave all of the
       sysv shared memory regiion specified by /tmp/shmkey over all nodes.

       numactl --offset=1G --length=1G --membind=1 --file  /dev/shm/A  --touch
       Bind the second gigabyte in the tmpfs file /dev/shm/A to node 1.

       numactl --localalloc /dev/shm/file Reset the policy for the shared mem‐
       ory file file to the default localalloc policy.

NOTES
       Requires an NUMA policy aware kernel.

       Command is not executed using  a	 shell.	 If  you  want	to  use	 shell
       metacharacters in the child use sh -c as wrapper.

       Setting	policy for a hugetlbfs file does currently not work because it
       cannot be extended by truncate.

       Shared memory segments larger than numactl's address  space  cannot  be
       completely  policied.  This  could be a problem on 32bit architectures.
       Changing it piece by piece may work.

       The old --cpubind which accepts node numbers, not cpu numbers, is  dep‐
       recated	and  replaced  with  the  new  --cpunodebind and --physcpubind
       options.

FILES
       /proc/cpuinfo for the listing of active CPUs. See proc(5) for details.

       /sys/devices/system/node/node*/numastat for NUMA memory hit statistics.

COPYRIGHT
       Copyright 2002,2004 Andi Kleen, SuSE Labs.  numactl and the  demo  pro‐
       grams are under the GNU General Public License, v.2

SEE ALSO
       set_mempolicy(2) , get_mempolicy(2) , mbind(2) , sched_setaffinity(2) ,
       sched_getaffinity(2) , proc(5) , ftok(3) , shmat(2) , migratepages(8)

SuSE Labs			   Mar 2004			    NUMACTL(8)
[top]

List of man pages available for CentOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net