1 .\" Copyright (c) 2015 Adrian Chadd <adrian@FreeBSD.org>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd "manage NUMA policy configuration"
53 command can be used to assign NUMA policies to processes/threads,
54 run commands with a given NUMA policy, and query information
55 about NUMA policies on running processes.
58 requires a target to modify or query.
59 The target may be specified as a command, process id or a thread id.
62 the target's NUMA policy may be queried.
65 the target's NUMA policy may be queried.
66 If no target is specified,
69 Not all combinations of operations and targets are supported.
71 you may not set the id of an existing set or query and launch a command
74 Each process and thread has a NUMA policy.
75 By default the policy is NONE.
76 If a thread policy is NONE, then the policy will fall back to the process.
77 If the process policy is NONE, then the policy will fall back to the
79 The policy may be queried by using
82 The options are as follows:
83 .Bl -tag -width ".Fl -cpudomain Ar domain"
84 .It Fl -cpudomain Ar domain , Fl c Ar domain
85 Set the given CPU scheduling policy.
86 Constrain the object (tid, pid, command) to run on CPUs
87 that belong to the given domain.
89 Retrieve the NUMA policy for the given thread or process id.
91 Set the NUMA policy for the given thread or process id.
92 .It Fl -memdomain Ar domain , Fl m Ar domain
93 Constrain the object (tid, pid, command) to the given
95 This is only valid for fixed-domain and fixed-domain-rr.
96 It must not be set for other policies.
97 .It Fl -mempolicy Ar policy , Fl l Ar policy
98 Set the given memory allocation policy.
99 Valid policies are none, rr, fixed-domain, fixed-domain-rr,
100 first-touch, and first-touch-rr.
101 A memdomain argument is required for fixed-domain and
103 .It Fl -pid Ar pid , Fl p Ar pid
104 Operate on the given pid.
105 .It Fl -tid Ar tid , Fl t Ar tid
106 Operate on the given tid.
113 process with memory coming from domain 0, but
114 CPUs coming from domain 1:
115 .Dl numactl --mempolicy=fixed-domain --memdomain=0 --cpudomain=1 /bin/sh
117 Query the NUMA policy for the
119 .Dl numactl --get --pid=<sh pid>
121 Set the NUMA policy for the given TID to round-robin:
122 .Dl numactl --set --mempolicy=rr --tid=<tid>
129 command first appeared in
132 .An Adrian Chadd Aq Mt adrian@FreeBSD.org