Description

This article gives an explanation on how to check the CPU details of a server and how to check the NUMA nodes of the server.

Solution

lscpu command will give the CPU architecture of the system including which NUMA node is mapped to which CPU as per the below output.

root@kvm-server:~# lscpu
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Byte Order:                         Little Endian
Address sizes:                      46 bits physical, 48 bits virtual
CPU(s):                             48
On-line CPU(s) list:                0-47
Thread(s) per core:                 2
Core(s) per socket:                 12
Socket(s):                          2
NUMA node(s):                       2
Vendor ID:                          GenuineIntel
CPU family:                         6
Model:                              63
Model name:                         Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz
Stepping:                           2
CPU MHz:                            1197.379
CPU max MHz:                        3500.0000
CPU min MHz:                        1200.0000
BogoMIPS:                           5188.09
Virtualization:                     VT-x
L1d cache:                          768 KiB
L1i cache:                          768 KiB
L2 cache:                           6 MiB
L3 cache:                           60 MiB
NUMA node0 CPU(s):                  0-11,24-35
NUMA node1 CPU(s):                  12-23,36-47
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        KVM: Mitigation: Split huge pages
Vulnerability L1tf:                 Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds:                  Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown:             Mitigation; PTI
Vulnerability Mmio stale data:      Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed:             Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
                                     syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf p
                                    ni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe po
                                    pcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti intel_ppin ssbd ibrs i
                                    bpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveop
                                    t cqm_llc cqm_occup_llc dtherm ida arat pln pts md_clear flush_l1d

 

Please find the CPU calculation as per the above output.

Socket(s) = 2 

Core(s) = 12

CPU Core(s) = 2 Sockets() * 12 Core(s) = 24 

Thread(s) per core = 2

CPU(S)= 24 CPU Core(s) * 2 Thread(s) per core = 48

So, the device in total has 48 CPU's

 

NUMA Node: A NUMA node is a logical grouping of CPUs and the memory that is physically closest to them. Each NUMA node typically has a local memory and can access memory in other NUMA nodes, but this inter-node memory access is slower compared to accessing its own local memory.

NUMA node0 CPU(s):                  0-11,24-35
NUMA node1 CPU(s):                  12-23,36-47

Access to memory in NUMA Node 0 is faster for CPUs in NUMA Node 0 and the same applies to NUMA Node 1.

 

The memory per NUMA node can be checked using the below commands,

cat /sys/devices/system/node/node0/meminfo
cat /sys/devices/system/node/node1/meminfo

 

root@kvm-server:~# cat /sys/devices/system/node/node0/meminfo
Node 0 MemTotal:       98907960 kB
Node 0 MemFree:        86712536 kB
Node 0 MemUsed:        12195424 kB
Node 0 Active:         10205908 kB
Node 0 Inactive:         688228 kB
Node 0 Active(anon):    8274916 kB
Node 0 Inactive(anon):      320 kB
Node 0 Active(file):    1930992 kB
Node 0 Inactive(file):   687908 kB
Node 0 Unevictable:       13040 kB
Node 0 Mlocked:           13040 kB
Node 0 Dirty:               700 kB
Node 0 Writeback:             0 kB
Node 0 FilePages:       2631244 kB
Node 0 Mapped:           168316 kB
Node 0 AnonPages:       8275928 kB
Node 0 Shmem:              1128 kB
Node 0 KernelStack:        6344 kB
Node 0 PageTables:        18940 kB
Node 0 NFS_Unstable:          0 kB
Node 0 Bounce:                0 kB
Node 0 WritebackTmp:          0 kB
Node 0 KReclaimable:     164064 kB
Node 0 Slab:             742720 kB
Node 0 SReclaimable:     164064 kB
Node 0 SUnreclaim:       578656 kB
Node 0 AnonHugePages:   8194048 kB
Node 0 ShmemHugePages:        0 kB
Node 0 ShmemPmdMapped:        0 kB
Node 0 FileHugePages:        0 kB
Node 0 FilePmdMapped:        0 kB
Node 0 HugePages_Total:     0
Node 0 HugePages_Free:      0
Node 0 HugePages_Surp:      0

Modification History

v1