summaryrefslogtreecommitdiff
path: root/static/freebsd/man4/numa.4 3.html
blob: 0dbba7820a6d668c2f8f2ec70a904710d5c5097f (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<table class="head">
  <tr>
    <td class="head-ltitle">NUMA(4)</td>
    <td class="head-vol">Device Drivers Manual</td>
    <td class="head-rtitle">NUMA(4)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">NUMA</code> &#x2014; <span class="Nd">Non-Uniform
    Memory Access</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">options MAXMEMDOM</code>
  <br/>
  <code class="Cd">options NUMA</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">Non-Uniform Memory Access is a computer architecture design which
    involves unequal costs between processors, memory and IO devices in a given
    system.</p>
<p class="Pp">In a <code class="Nm">NUMA</code> architecture, the latency to
    access specific memory or IO devices depends upon which processor the memory
    or device is attached to. Accessing memory local to a processor is faster
    than accessing memory that is connected to one of the other processors.
    <span class="Ux">FreeBSD</span> implements NUMA-aware memory allocation
    policies. By default it attempts to ensure that allocations are balanced
    across each domain. Users may override the default domain selection policy
    using <a class="Xr">cpuset(1)</a>.</p>
<p class="Pp"><code class="Nm">NUMA</code> support is enabled when the
    <code class="Cd">NUMA</code> option is specified in the kernel configuration
    file. Each platform defines the <code class="Cd">MAXMEMDOM</code> constant,
    which specifies the maximum number of supported NUMA domains. This constant
    may be specified in the kernel configuration file.
    <code class="Nm">NUMA</code> support can be disabled at boot time by setting
    the <var class="Va">vm.numa.disabled</var> tunable to 1. Other values for
    this tunable are currently ignored.</p>
<p class="Pp">Thread and process <code class="Nm">NUMA</code> policies are
    controlled with the <a class="Xr">cpuset_getdomain(2)</a> and
    <a class="Xr">cpuset_setdomain(2)</a> syscalls. The
    <a class="Xr">cpuset(1)</a> tool is available for starting processes with a
    non-default policy, or to change the policy of an existing thread or
    process. See <a class="Xr">SMP(4)</a> for information about CPU to domain
    mapping.</p>
<p class="Pp">Systems with non-uniform access to I/O devices may mark those
    devices with the local VM domain identifier. Drivers can find out their
    local domain information by calling <a class="Xr">bus_get_domain(9)</a>.</p>
<section class="Ss">
<h2 class="Ss" id="MIB_Variables"><a class="permalink" href="#MIB_Variables">MIB
  Variables</a></h2>
<p class="Pp">The operation of <code class="Nm">NUMA</code> is controlled and
    exposes information with these <a class="Xr">sysctl(8)</a> MIB
  variables:</p>
<p class="Pp"></p>
<dl class="Bl-tag Bl-compact">
  <dt id="vm.ndomains"><var class="Va">vm.ndomains</var></dt>
  <dd>The number of VM domains which have been detected.
    <p class="Pp"></p>
  </dd>
  <dt id="vm.phys_locality"><var class="Va">vm.phys_locality</var></dt>
  <dd>A table indicating the relative cost of each VM domain to each other. A
      value of 10 indicates equal cost. A value of -1 means the locality map is
      not available or no locality information is available.
    <p class="Pp"></p>
  </dd>
  <dt id="vm.phys_segs"><var class="Va">vm.phys_segs</var></dt>
  <dd>The map of physical memory, grouped by VM domain.</dd>
</dl>
</section>
</section>
<section class="Sh">
<h1 class="Sh" id="IMPLEMENTATION_NOTES"><a class="permalink" href="#IMPLEMENTATION_NOTES">IMPLEMENTATION
  NOTES</a></h1>
<p class="Pp">The current <code class="Nm">NUMA</code> implementation is
    VM-focused. The hardware <code class="Nm">NUMA</code> domains are mapped
    into a contiguous, non-sparse VM domain space, starting from 0. Thus, VM
    domain information (for example, the domain identifier) is not necessarily
    the same as is found in the hardware specific information. Policy
    information is available in both struct thread and struct proc.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">cpuset(1)</a>,
    <a class="Xr">cpuset_getaffinity(2)</a>,
    <a class="Xr">cpuset_setaffinity(2)</a>, <a class="Xr">SMP(4)</a>,
    <a class="Xr">bus_get_domain(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp"><code class="Nm">NUMA</code> first appeared in
    <span class="Ux">FreeBSD 9.0</span> as a first-touch allocation policy with
    a fail-over to round-robin allocation and was not configurable. It was then
    modified in <span class="Ux">FreeBSD 10.0</span> to implement a round-robin
    allocation policy and was also not configurable.</p>
<p class="Pp">The <a class="Xr">numa_getaffinity(2)</a> and
    <a class="Xr">numa_setaffinity(2)</a> syscalls and the
    <a class="Xr">numactl(1)</a> tool first appeared in <span class="Ux">FreeBSD
    11.0</span> and were removed in <span class="Ux">FreeBSD 12.0</span>. The
    current implementation appeared in <span class="Ux">FreeBSD 12.0</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">This manual page written by <span class="An">Adrian Chadd</span>
    &lt;<a class="Mt" href="mailto:adrian@FreeBSD.org">adrian@FreeBSD.org</a>&gt;.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="NOTES"><a class="permalink" href="#NOTES">NOTES</a></h1>
<p class="Pp">No statistics are kept to indicate how often
    <code class="Nm">NUMA</code> allocation policies succeed or fail.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">October 22, 2018</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>