[Repost] CPU three architecture numa smp mpp

CPU three major architectures numa smp mpp

https://www.jianshu.com/p/26fd21898c9f

 

The performance of the system largely depends on the support of the CPU hardware architecture. Here are the differences between the three common architectures of CPU

junior high

SMP (Symmetric Multiprocessing), symmetric multiprocessor. As the name implies, all processors in SMP are equal, they share the same physical memory through the bus connection, which also leads to all resources (CPU, memory, I / O, etc.) are shared. When we open the back cover of the server, if we find that there are multiple CPU slots, but they are connected to the same memory slot, it is generally a smp architecture server. The common PCs, laptops, mobile phones and some old servers are all of this architecture. The architecture is simple, but the expansion performance is very poor. You can also see from Linux:

 ls /sys/devices/system/node/# 如果只看到一个node0 那就是smp架构

It can be seen that there is only one node. After testing by the great gods, 2 to 4 CPUs are more suitable for the smp architecture.

IN

NUMA (Non-Uniform Memory Access), a non-uniform access storage model. This model is a technical solution proposed to solve the poor scalability of smp. If smp is equivalent to multiple CPUs connected to a memory pool, the request often conflicts. In other words, numa is to separate the resources of the CPU and cut it in units of nodes. Each node has its own core, memory and other resources. This also leads to an improvement in the performance of the CPU, but the same problem is that The resource interaction between the two nodes is very slow. When the CPU is increased, the performance improvement is not very high. So you can see that there are many servers with many cores but only 2 node zones.

MPP

MPP (Massive Parallel Processing), which can actually be understood as a blade server, each blade fan is an independent smp architecture server, and each blade fan has high-performance network equipment to interact, ensuring Data transmission performance between smp servers. . Compared to numa, it is more suitable for large-scale computing. The only disadvantage is that when the number of smp nodes increases, the corresponding computing management system needs to be correspondingly improved.

About a few basic concepts

The following command can easily see the CPU architecture and configuration

#lscpu
Architecture:          x86_64
CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 1 #每个core 有几个线程 Core(s) per socket: 4 #每个槽位有4个core Socket(s): 2 #服务器面板上有2个cpu 槽位 NUMA node(s): 2 #nodes的数量 Vendor ID: GenuineIntel CPU family: 6 Model: 44 Stepping: 2 CPU MHz: 2128.025 BogoMIPS: 4256.03 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 8192K NUMA node0 CPU(s): 0,2,4,6 #对应的core NUMA node1 CPU(s): 1,3,5,7 

Since the numa architecture often has uneven memory allocation, manual intervention is often required. In addition to the code, there are linux commands to bind the CPU:

taskset  -cp 1,2  25718 #将进程ID 25718 绑定到cpu的第1和第2个core 里

Guess you like

Origin www.cnblogs.com/jinanxiaolaohu/p/12689152.html