← 返回命令列表

Linux command

numactl 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

numactl --cpunodebind=0 --membind=0,1 -- command

Example

numactl --physcpubind=0-4,8-12 -- command

Example

numactl --interleave=all -- command

Example

numactl --show

Example

numactl --hardware

Example

numactl --preferred=0 -- command

说明

numactl runs processes with a specific NUMA (Non-Uniform Memory Access) scheduling or memory placement policy. The policy is set for the command and inherited by all its children. It can also manage policies for shared memory segments.

参数

-a, --all
Disable cpuset awareness for broader CPU/node access
-i, --interleave=nodes
Round-robin memory allocation across specified nodes
-m, --membind=nodes
Restrict memory allocation to specified nodes only
-N, --cpunodebind=nodes
Limit CPU execution to processors on specified nodes
-C, --physcpubind=cpus
Bind process to specific physical CPUs
-l, --localalloc
Prefer allocation on current node with fallback
-p, --preferred=node
Prefer single node for allocation with fallback
-P, --preferred-many=nodes
Prefer multiple nodes based on proximity
-b, --balancing
Enable kernel NUMA balancing
-s, --show
Display current NUMA policy settings
-H, --hardware
Show available nodes and CPUs
--huge
Use huge pages for SYSV shared memory
--shm, --shmid
Specify shared memory segment
--touch
Enforce policy immediately rather than on access
--strict
Error if pages already faulted with conflicting policy
-V, --version
Print version and exit

FAQ

What is the numactl command used for?

numactl runs processes with a specific NUMA (Non-Uniform Memory Access) scheduling or memory placement policy. The policy is set for the command and inherited by all its children. It can also manage policies for shared memory segments.

How do I run a basic numactl example?

Run `numactl --cpunodebind=0 --membind=0,1 -- command` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -a, --all do in numactl?

Disable cpuset awareness for broader CPU/node access