相同的物理内核不同的 NUMA 节点
Same physical core different NUMA node
按照在我的 AMD Opteron(TM) 处理器 6234 上识别哪些逻辑内核共享相同物理内核的步骤,我发现共享相同物理内核的 2 个逻辑内核不在同一个 NUMA 节点中。
我的步骤是 lscpu
以获得 NUMA 节点相关核心:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 24
On-line CPU(s) list: 0-23
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 2
NUMA node(s): 4
Vendor ID: AuthenticAMD
CPU family: 21
Model: 1
Model name: AMD Opteron(TM) Processor 6234
Stepping: 2
CPU MHz: 1400.000
CPU max MHz: 2400.0000
CPU min MHz: 1400.0000
BogoMIPS: 4799.98
Virtualization: AMD-V
L1d cache: 16K
L1i cache: 64K
L2 cache: 2048K
L3 cache: 6144K
NUMA node0 CPU(s): 0-5
NUMA node1 CPU(s): 6-11
NUMA node2 CPU(s): 12-17
NUMA node3 CPU(s): 18-23
然后 cat /proc/cpuinfo | grep "core id"
以对核心进行分组:
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
最后 cat /proc/cpuinfo | grep "physical id"
以获得共享相同核心 ID 和相同物理的核心 CPU:
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
由此我得出结论,核心 0 和 6 共享相同的物理核心,但是核心 0 在 NUMA 节点 0 中,核心 6 在 NUMA 节点 1 中。
我觉得很烦人,可以吗?
提前感谢您的帮助。
对于皓龙 6234,每个封装内有 2 个裸片,每个裸片都是一个 NUMA 节点,每个裸片有 6 个内核。没有 SMT(超线程),因此每个内核只有一个 CPU。
您期望的是:
CPU_number = package:die_in_package:core_in_die:CPU_in_core, NUMA node
0 = 0:0:0:0, NUMA node 0
1 = 0:0:1:0, NUMA node 0
2 = 0:0:2:0, NUMA node 0
3 = 0:0:3:0, NUMA node 0
4 = 0:0:4:0, NUMA node 0
5 = 0:0:5:0, NUMA node 0
6 = 0:1:0:0, NUMA node 1
7 = 0:1:1:0, NUMA node 1
8 = 0:1:2:0, NUMA node 1
9 = 0:1:3:0, NUMA node 1
10 = 0:1:4:0, NUMA node 1
11 = 0:1:5:0, NUMA node 1
12 = 1:0:0:0, NUMA node 1
13 = 1:0:1:0, NUMA node 2
14 = 1:0:2:0, NUMA node 2
15 = 1:0:3:0, NUMA node 2
16 = 1:0:4:0, NUMA node 2
17 = 1:0:5:0, NUMA node 2
18 = 1:1:0:0, NUMA node 3
19 = 1:1:1:0, NUMA node 3
20 = 1:1:2:0, NUMA node 3
21 = 1:1:3:0, NUMA node 3
22 = 1:1:4:0, NUMA node 3
24 = 1:1:5:0, NUMA node 3
现在看CPU0号和CPU6号,它们的包号相同,NUMA节点相同,"CPU in die";但他们有不同的模具编号。 None 你得到的信息提到 "die numbers",这就是你感到困惑的原因。
按照在我的 AMD Opteron(TM) 处理器 6234 上识别哪些逻辑内核共享相同物理内核的步骤,我发现共享相同物理内核的 2 个逻辑内核不在同一个 NUMA 节点中。
我的步骤是 lscpu
以获得 NUMA 节点相关核心:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 24
On-line CPU(s) list: 0-23
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 2
NUMA node(s): 4
Vendor ID: AuthenticAMD
CPU family: 21
Model: 1
Model name: AMD Opteron(TM) Processor 6234
Stepping: 2
CPU MHz: 1400.000
CPU max MHz: 2400.0000
CPU min MHz: 1400.0000
BogoMIPS: 4799.98
Virtualization: AMD-V
L1d cache: 16K
L1i cache: 64K
L2 cache: 2048K
L3 cache: 6144K
NUMA node0 CPU(s): 0-5
NUMA node1 CPU(s): 6-11
NUMA node2 CPU(s): 12-17
NUMA node3 CPU(s): 18-23
然后 cat /proc/cpuinfo | grep "core id"
以对核心进行分组:
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
最后 cat /proc/cpuinfo | grep "physical id"
以获得共享相同核心 ID 和相同物理的核心 CPU:
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
physical id : 1
由此我得出结论,核心 0 和 6 共享相同的物理核心,但是核心 0 在 NUMA 节点 0 中,核心 6 在 NUMA 节点 1 中。
我觉得很烦人,可以吗?
提前感谢您的帮助。
对于皓龙 6234,每个封装内有 2 个裸片,每个裸片都是一个 NUMA 节点,每个裸片有 6 个内核。没有 SMT(超线程),因此每个内核只有一个 CPU。
您期望的是:
CPU_number = package:die_in_package:core_in_die:CPU_in_core, NUMA node
0 = 0:0:0:0, NUMA node 0
1 = 0:0:1:0, NUMA node 0
2 = 0:0:2:0, NUMA node 0
3 = 0:0:3:0, NUMA node 0
4 = 0:0:4:0, NUMA node 0
5 = 0:0:5:0, NUMA node 0
6 = 0:1:0:0, NUMA node 1
7 = 0:1:1:0, NUMA node 1
8 = 0:1:2:0, NUMA node 1
9 = 0:1:3:0, NUMA node 1
10 = 0:1:4:0, NUMA node 1
11 = 0:1:5:0, NUMA node 1
12 = 1:0:0:0, NUMA node 1
13 = 1:0:1:0, NUMA node 2
14 = 1:0:2:0, NUMA node 2
15 = 1:0:3:0, NUMA node 2
16 = 1:0:4:0, NUMA node 2
17 = 1:0:5:0, NUMA node 2
18 = 1:1:0:0, NUMA node 3
19 = 1:1:1:0, NUMA node 3
20 = 1:1:2:0, NUMA node 3
21 = 1:1:3:0, NUMA node 3
22 = 1:1:4:0, NUMA node 3
24 = 1:1:5:0, NUMA node 3
现在看CPU0号和CPU6号,它们的包号相同,NUMA节点相同,"CPU in die";但他们有不同的模具编号。 None 你得到的信息提到 "die numbers",这就是你感到困惑的原因。