Skip to content

fix the numactl command control failure#642

Open
pengjunjie2100 wants to merge 1252 commits intoztxz16:masterfrom
pengjunjie2100:numa-fix
Open

fix the numactl command control failure#642
pengjunjie2100 wants to merge 1252 commits intoztxz16:masterfrom
pengjunjie2100:numa-fix

Conversation

@pengjunjie2100
Copy link
Copy Markdown

遇到一个情况,在NPS2配置服务器测试,机器一共有4个numa节点,需要使用numactl -N 0,1 -m 0,1 命令限制运行在节点0,1上,希望只启动2个compute server,但是当前实现调用numa_get_mems_allowed()获取可用numa节点函数,还是获取总的可用节点数4,这种情况下仍然会启动4个 computeserver,numactl控制无效,不符合预期。
image

建议改成调用numa_get_membind(),这样如果使用numactl命令会受-m参数控制, 按用户要求,使用指定节点;如果不使用numactl -m参数,跟以前一样还获取总的节点数。

以下是修改后使用numactl -N 0,1 -m 0,1 效果,只启动了2个computeserver,符合预期,测试对其他功能没有影响。
image
image

@ztxz16 ztxz16 force-pushed the master branch 3 times, most recently from e1b5c57 to dce3e6c Compare March 2, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants