我们看到鲲鹏920上有128个物理cores(0-127),2个Socket,4个NUMA,如何知道物理core是落在哪个Socket上?
查看CPU个数,128个物理cores
[root@localhost cpu]
Architecture: aarch64
Byte Order: Little Endian
CPU(s): 128
On-line CPU(s) list: 0-127
Thread(s) per core: 1
Core(s) per socket: 64
Socket(s): 2
NUMA node(s): 4
Model: 0
CPU max MHz: 2600.0000
CPU min MHz: 200.0000
BogoMIPS: 200.00
L1d cache: 64K
L1i cache: 64K
L2 cache: 512K
L3 cache: 65536K
NUMA node0 CPU(s): 0-31
NUMA node1 CPU(s): 32-63
NUMA node2 CPU(s): 64-95
NUMA node3 CPU(s): 96-127
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop
具体来看物理core属于哪个NUMA,也就是哪个Node。鲲鹏上NUMA=Node
根据信息,NUMA0,1靠的比较近,猜测属于一个Socket
[root@localhost node0]
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
node 0 size: 97714 MB
node 0 free: 77724 MB
node 1 cpus: 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
node 1 size: 98201 MB
node 1 free: 93405 MB
node 2 cpus: 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
node 2 size: 98201 MB
node 2 free: 79779 MB
node 3 cpus: 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 3 size: 98199 MB
node 3 free: 90048 MB
node distances:
node 0 1 2 3
0: 10 12 20 22
1: 12 10 22 24
2: 20 22 10 12
3: 22 24 12 10
0 1 2 3 看后四行 核心数对应就行
查看numastat
[root@localhost node0]
node0 node1 node2 node3
numa_hit 397893104 15671778 4599060 27556406
numa_miss 0 0 0 0
numa_foreign 0 0 0 0
interleave_hit 1574 1642 1569 1695
local_node 397892269 15668947 4596482 27553048
other_node 835 2831 2578 3358
一台整机有4个Node,查看node0上有哪些物理core,能够看到0-31
[root@localhost cpu]
[root@localhost cpu0]
[root@localhost node0]
compact cpu10 cpu13 cpu16 cpu19 cpu21 cpu24 cpu27 cpu3 cpu4 cpu7 cpulist hugepages power vmstat
cpu0 cpu11 cpu14 cpu17 cpu2 cpu22 cpu25 cpu28 cpu30 cpu5 cpu8 cpumap meminfo subsystem
cpu1 cpu12 cpu15 cpu18 cpu20 cpu23 cpu26 cpu29 cpu31 cpu6 cpu9 distance numastat uevent
查看整机上有哪些物理core
[root@localhost cpu]
/sys/devices/system/cpu
[root@localhost cpu]
cpu0 cpu108 cpu118 cpu13 cpu23 cpu33 cpu43 cpu53 cpu63 cpu73 cpu83 cpu93 kernel_max
cpu1 cpu109 cpu119 cpu14 cpu24 cpu34 cpu44 cpu54 cpu64 cpu74 cpu84 cpu94 modalias
cpu10 cpu11 cpu12 cpu15 cpu25 cpu35 cpu45 cpu55 cpu65 cpu75 cpu85 cpu95 nohz_full
cpu100 cpu110 cpu120 cpu16 cpu26 cpu36 cpu46 cpu56 cpu66 cpu76 cpu86 cpu96 offline
cpu101 cpu111 cpu121 cpu17 cpu27 cpu37 cpu47 cpu57 cpu67 cpu77 cpu87 cpu97 online
cpu102 cpu112 cpu122 cpu18 cpu28 cpu38 cpu48 cpu58 cpu68 cpu78 cpu88 cpu98 possible
cpu103 cpu113 cpu123 cpu19 cpu29 cpu39 cpu49 cpu59 cpu69 cpu79 cpu89 cpu99 power
cpu104 cpu114 cpu124 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 cpu8 cpu9 cpufreq present
cpu105 cpu115 cpu125 cpu20 cpu30 cpu40 cpu50 cpu60 cpu70 cpu80 cpu90 cpuidle uevent
cpu106 cpu116 cpu126 cpu21 cpu31 cpu41 cpu51 cpu61 cpu71 cpu81 cpu91 hotplug vulnerabilities
cpu107 cpu117 cpu127 cpu22 cpu32 cpu42 cpu52 cpu62 cpu72 cpu82 cpu92 isolated
|