gpt4 book ai didi

c - numactl --membind

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:37:31 24 4
gpt4 key购买 nike

在 Linux 中使用带 --membind 选项的 numactl 时,假设我执行以下操作:

numactl --membind=0,1,2 ./prog

是否会在所有 NUMA 节点 0、1 和 2 上分配 ./prog 的内存?或者如果NUMA节点0的内存不够,是否只在NUMA节点1和2上分配内存?谢谢。

最佳答案

numactl 的联机帮助页说:

--membind=nodes, -m nodes 
Only allocate memory from nodes. Allocation will fail when there is not enough
memory available on these nodes.

所以,如果节点0没有足够的内存,内存将分配在节点1,2上。每个节点实际分配的内存比例可能取决于内存放置策略

关于c - numactl --membind,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14669900/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com