文章目录
CentOS验证是否开启numa
方式一:
root@fuse01:~# dmesg | grep numa #下面结果显示的Enabling,说明开启了numa
[ 0.371506] mempolicy: Enabling automatic NUMA balancing. Configure with numa_balancing= or the kernel.numa_balancing sysctl
方式二:
[root@node100 ~]# lscpu | grep -E '(Socket|NUMA node)'
Socket(s): 2 #显示有两个物理cpu
NUMA node(s): 1 #node节点只有一个,说明关闭了numa的
NUMA node0 CPU(s): 0-23
方式三:
[root@node100 ~]# numactl --hardware #或者使用 numactl -H 命令,下面显示多个node 就说明开启了的(若没有该命令可以直接安装 apt install -y numactl)
available: 2 nodes (0-1)
node 0 cpus: 0 2 4 6 8 10 12 14 16 18 20 22
node 0 size: 32086 MB
node 0 free: 14073 MB
node 1 cpus: 1 3 5 7 9 11 13 15 17 19 21 23
node 1 size: 32249 MB
node 1 free: 5774 MB
node distances:
node 0 1
0: 10 20
1: 20 10
CentOS如何关闭numa
关闭numa
grubby --update-kernel=ALL --args="numa=off" #更新内核,给所有内核加上该参数
reboot #重启后再次验证
再次开启numa
#grubby --update-kernel=ALL --remove-arguments="numa=off" #亲自测试没用
grubby --update-kernel=ALL --args="numa=on"
reboot
如果文章对你有帮助,欢迎点击上方按钮打赏作者
暂无评论