Got it

What is NUMA(non-uniform memory access) Highlighted

Latest reply: Nov 24, 2021 01:02:29 3042 50 22 0 0

Hello, friend!

Do you know the NUMA? Don't worry, the post will share with you!

What is NUMA?

Non-uniform memory access (NUMA) is a computer memory design used in multiprocessing, where the memory access time depends on the memory location relative to the processor. Under NUMA, a processor can access its own local memory faster than non-local memory (memory local to another processor or memory shared between processors). The benefits of NUMA are limited to particular workloads, notably on servers where the data is often associated strongly with certain tasks or users.

NUMA

In the NUMA architecture, there are multiple CPU modules, and each CPU module includes multiple CPUs, and has independent local memory, I/O slots, and the like. Each CPU can access the memory of the entire system because its nodes can connect and exchange information by using an interconnection module (for example, a crossbar switch). Obviously, the speed of accessing the local memory is much higher than that of accessing the remote memory (memory of other nodes in the system), which is also the reason for non-consistent memory access. 

In terms of architecture, NUMA and MPP have many similarities. They are composed of multiple nodes. Each node has its own CPU, memory, and I/O. Nodes can exchange information through the node interconnection mechanism. But there's a big difference: 

1. Node interconnection mechanism: The node interconnection mechanism of the NUMA is implemented in the same physical server. When a CPU needs to access the remote memory, it must wait. This is the main reason why the NUMA server cannot implement linear performance expansion when the CPU increases. 

2. Memory access mechanism: In the NUMA server, any CPU can access the memory of the entire system, but the performance of remote access is far lower than that of local memory access. Therefore, remote memory access should be avoided when developing applications.

Function

What is Numa and what is its function?

What is NUMA affinity?

Memory access between NUMA regions not only needs to pass through a memory bus, but also needs to pass through an inter-region bus to access data. On the one hand, this access increases the delay, and on the other hand, there is a possibility of secondary collision on the QPI bus. In addition, the high-speed interconnection bus led by the QPI/UPI is a patented technology of Intel. Although the access speed of the bus is lower than that of the memory bus, the CPU of the Intel x86 architecture does not cause a big bottleneck. ARM does not include this technology, so the bottleneck is even more serious. Therefore, NUMA affinity needs to be set for VMs that have high memory access efficiency, especially for ARM CPUs. For NUMA affinity, you can select a NUMA topology to limit the NUMA region where CPUs allocated to VMs are located, and a corresponding quantity of CPUs and memory allocated in each region. Compared with the scenario where the CPU and memory are randomly allocated when NUMA affinity is disabled, the CPU access to another NUMA region can be reduced to improve efficiency. In the extreme case, the NUMA region where the CPU allocated to the VM is located is set to 1. In this case, the CPU and memory allocated to the VM are in the same NUMA region. In this case, no cross-NUMA memory access exists. But it can also lead to a waste of resources. (For example, NUMA 0 has two CPUs, NUMA 1 has two CPUs, and there is a 4-CPU VM. If the NUMA region where the CPU allocated to the VM resides is set to 1, the VM cannot be deployed.)

NUMA Annfinity

NUMA affinity means that VMs share the memory and CPU resources on the same NUMA node. That is, the CPU and memory of VMs must be on the same NUMA node. NUMA affinity means that VMs share memory, CPU, and PCI resources on the same NUMA. 

In addition, huge page VMs must be created on the NUMA node. The EVS and sriov NIC VMs must be created on the NUMA node. NUMA VMs and non-NUMA VMs cannot share the same board.

VM NUMA affinity

1. Register an image. 

2. Create a flavor.

flavor

instance

3. Create a network. 

4. Create a VM. 

5. Check the NUMA information of the NUMA affinity VM. 

a. On the FusionSphere OpenStack server, run the nova show $vmid command to obtain the instance ID of the VM.

instanceID

b. Log in to the host where the NUMA affinity VM resides in SSH mode and run the virsh vcpuin instanceID command to query the vCPU information of the VM.

NUMA

c. Run the numactl -H command to check the NUMA nodes (node0 and node1) on the host where the NUMA affinity VM resides, as well as the CPU and memory of each NUMA node. The CPU and memory of the NUMA affinity VM are stored on the NUMA node numa0.

numactl -h

That's all, thanks!

  • x
  • convention:

little_fish
Admin Created Aug 23, 2021 08:03:13

Thanks.
View more
  • x
  • convention:

zj5000
Created Aug 23, 2021 08:32:58

Numa function:

numaOpts: Whether to specify numa affinity, the default is not enabled. There are two values, 0 or 1. If it is set to 0, it will not be turned on, indicating that the CPU and memory of the virtual machine can be allocated across the numa. For example, the physical machine has two numa nodes: numa0 and numa1. 

The five CPUs of the virtual machine A can be assigned one each on numa0 and numa1. This program is automatically allocated according to the resources based on numa0 and numa1. Set to 1, virtual machine A's CPU and memory are not allowed to be allocated across the numa node, that is, either the CPU or the memory are all allocated on numa0, or all are allocated on numa1.

https://forum.huawei.com/enterprise/en/what-is-numa-feature-in-fusioncloud/thread/543541-893


View more
  • x
  • convention:

olive.zhao
olive.zhao Created Aug 24, 2021 01:09:04 (0) (0)
Thanks!  
azkasaqib
azkasaqib Created Aug 24, 2021 17:34:21 (0) (0)
 
S_Noch
S_Noch Created Sep 21, 2021 06:41:41 (0) (0)
 
pupu.F
Created Aug 24, 2021 07:01:00

Good post!
View more
  • x
  • convention:

azkasaqib
azkasaqib Created Aug 24, 2021 17:34:27 (0) (0)
 
olive.zhao
olive.zhao Created Aug 25, 2021 01:03:12 (0) (0)
 
user_4326135
Created Aug 24, 2021 10:47:22

Awesome post. Thank you for sharing!
View more
  • x
  • convention:

olive.zhao
olive.zhao Created Aug 25, 2021 01:03:19 (0) (0)
 
bobi
Created Aug 24, 2021 11:24:47

Great.
View more
  • x
  • convention:

olive.zhao
olive.zhao Created Aug 25, 2021 01:03:32 (0) (0)
 
Unicef
MVE Created Aug 24, 2021 11:42:09

Cool thanks for sharing
View more
  • x
  • convention:

olive.zhao
olive.zhao Created Aug 25, 2021 01:04:15 (0) (0)
 
wissal
MVE Created Aug 24, 2021 16:55:59

Learning together, every day!
View more
  • x
  • convention:

olive.zhao
olive.zhao Created Aug 25, 2021 01:04:45 (0) (0)
Learning together!  
wissal
MVE Created Aug 24, 2021 16:59:05

NUMA is an alternative approach that links several small, cost-effective nodes using a high-performance connection. Each node contains processors and memory, much like a small SMP system. However, an advanced memory controller allows a node to use memory on all other nodes, creating a single system image. When a processor accesses memory that does not lie within its own node (remote memory), the data must be transferred over the NUMA connection, which is slower than accessing local memory. Memory access times are not uniform and depend on the location of the memory and the node from which it is accessed, as the technology’s name implies.
View more
  • x
  • convention:

olive.zhao
olive.zhao Created Aug 25, 2021 01:38:23 (0) (0)
Great!  
S_Noch
S_Noch Created Sep 21, 2021 06:41:49 (0) (0)
 
azkasaqib
Created Aug 24, 2021 17:33:56

Nice
View more
  • x
  • convention:

olive.zhao
olive.zhao Created Aug 25, 2021 01:38:30 (0) (0)
 
123
Back to list

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.