【RHCA+】numactl命令(管理numa)

本文介绍Linux下numactl命令的安装与核心用法,包括查看NUMA节点信息(numactl -H)、查询当前内存策略(numactl -s)以及常用参数含义。重点涵盖CPU绑定(--physcpubind)、内存绑定(--membind)、交错分配(--interleave)和首选节点(--preferred)等NUMA调度策略,适用于服务器性能调优与RHCA认证学习。

“ 目录:RHCA+ -> 15 硬件管理 -> 12 numactl命令(管理numa) ”

查看、管理numa;语法格式:numactl [参数]

参数

作用

--hardware, -H

查看numa结构

--show, -s

查看策略

--interleave, -i

平均使用各node资源

--membind, -m

使用哪个node的内存

--cpunodebind, -N

使用哪个node的cpu

--preferred, -p

应该优先用哪个node的cpu和内存

--localalloc, -l

限制程序只使用node本地内存,不能使用其他node内存;cpu不限制

一、安装

[root@wuzuniao ~]# yum -y install numactl #安装工具

二、使用

[root@wuzuniao ~]# numactl -H #查看服务器上的numa数量及每个node内的cpu和内存数

available: 1 nodes (0)

node 0 cpus: 0

node 0 size: 958 MB

node 0 free: 89 MB

node distances:

node 0

0: 10

[root@wuzuniao ~]# numactl -s #查看策略

policy: default

preferred node: current

physcpubind: 0

cpubind: 0

nodebind: 0

membind: 0

[root@wuzuniao ~]# numactl #输入错误就会弹出命令帮助

usage: numactl [--all | -a] [--interleave= | -i ] [--preferred= | -p ]

[--physcpubind= | -C ] [--cpunodebind= | -N ]

[--membind= | -m ] [--localalloc | -l] command args ...

numactl [--show | -s]

numactl [--hardware | -H]

numactl [--length | -l ] [--offset | -o ] [--shmmode | -M ]

[--strict | -t]

[--shmid | -I ] --shm | -S

[--shmid | -I ] --file | -f

[--huge | -u] [--touch | -T]

memory policy | --dump | -d | --dump-nodes | -D

memory policy is --interleave | -i, --preferred | -p, --membind | -m, --localalloc | -l

is a comma delimited list of node numbers or A-B ranges or all.

Instead of a number a node can also be:

netdev:DEV the node connected to network device DEV

file:PATH the node the block device of path is connected to

ip:HOST the node of the network device host routes through

block:PATH the node of block device path

pci:[seg:]bus:dev[:func] The node of a PCI device

is a comma delimited list of cpu numbers or A-B ranges or all

all ranges can be inverted with !

all numbers and ranges can be made cpuset-relative with +

the old --cpubind argument is deprecated.

use --cpunodebind or --physcpubind instead

can have g (GB), m (MB) or k (KB) suffixes

[root@wuzuniao ~]#

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

无足鸟ICT

谢谢

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址