376
NDCTL Linux Utility
The ndctl utility is used to create persistent memory capacity for the operating system,
called namespaces, as well as enumerating, enabling, and disabling the dimms,
regions, and namespaces. Using the –v (verbose) option shows what NUMA node
(numa_node) persistent memory DIMMS (-D), regions (-R), and namespaces (-N)
belong to. Listing 19-1 shows the region and namespaces for a two-socket system. We
can correlate the numa_node with the corresponding NUMA node shown by the numactl
command.
Listing 19-1. Region and namespaces for a two-socket system
# ndctl list -Rv
{
"regions":[
{
"dev":"region1",
"size":1623497637888,
"available_size":0,
"max_available_extent":0,
"type":"pmem",
"numa_node":1,
Table 19-1. numactl command options for binding processes to NUMA nodes or
CPUs
Option
Description
--membind, -m
only allocate memory from specific nUMa nodes. the allocation will fail
if there is not enough memory available on these nodes.
--cpunodebind, -N
only execute the process on CpUs from the specified nUMa nodes.
--physcpubind, -C
only execute process on the given CpUs.
--localalloc, -l
always allocate on the current nUMa node.
--preferred
preferably allocate memory on the specified nUMa node. if memory
cannot be allocated, fall back to other nodes.
Chapter 19 advanCed topiCs
NDCTL Linux Utility
The ndctl utility is used to create persistent memory capacity for the operating system,
called namespaces, as well as enumerating, enabling, and disabling the dimms,
regions, and namespaces. Using the –v (verbose) option shows what NUMA node
(numa_node) persistent memory DIMMS (-D), regions (-R), and namespaces (-N)
belong to. Listing 19-1 shows the region and namespaces for a two-socket system. We
can correlate the numa_node with the corresponding NUMA node shown by the numactl
command.
Listing 19-1. Region and namespaces for a two-socket system
# ndctl list -Rv
{
"regions":[
{
"dev":"region1",
"size":1623497637888,
"available_size":0,
"max_available_extent":0,
"type":"pmem",
"numa_node":1,
Table 19-1. numactl command options for binding processes to NUMA nodes or
CPUs
Option
Description
--membind, -m
only allocate memory from specific nUMa nodes. the allocation will fail
if there is not enough memory available on these nodes.
--cpunodebind, -N
only execute the process on CpUs from the specified nUMa nodes.
--physcpubind, -C
only execute process on the given CpUs.
--localalloc, -l
always allocate on the current nUMa node.
--preferred
preferably allocate memory on the specified nUMa node. if memory
cannot be allocated, fall back to other nodes.
Chapter 19 advanCed topiCs
