linux如何关闭和开启numa

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
声明:本文为原创,作者为 辣条①号,转载时请保留本声明及附带文章链接:https://boke.wsfnk.com/archives/993.html
谢谢你请我吃辣条谢谢你请我吃辣条

如果文章对你有帮助,欢迎点击上方按钮打赏作者

最后编辑于:2023/2/16作者: 辣条①号

现在在做什么? 接下来打算做什么? 你的目标什么? 期限还有多少? 进度如何? 不负遇见,不谈亏欠!

暂无评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

arrow grin ! ? cool roll eek evil razz mrgreen smile oops lol mad twisted wink idea cry shock neutral sad ???

文章目录