Cloud computing - CPU virtualization

  • About the author: A cloud computing network operation and maintenance personnel, sharing the technology and dry goods of network and operation and maintenance every day. 

  •  Motto: Keep your head down and hurry on your way, be respectful

  • Personal homepage: Homepage of Netdou

 

 

Table of contents

 foreword

1. CPU virtualization

 1. CPU virtualization computing

(1) The computing power of a CPU

(2) Computing power of one server

(3) The computing power of the cluster

(4) Example

 2.CPU Qos

(1) Advantages of CPU Qos

3.NUMA

(1) Advantages of NUMA


 foreword

This chapter will explain CPU virtualization in cloud computing virtualization.


1. CPU virtualization

In the physical machine (host machine), a fake CPU is simulated through pure software such as threads or processes, and a physical CPU can be sent to different virtual machines for use through CPU virtualization.

  • Each virtual CPU is actually a thread or process, so the number of physical CPU cores is greater than the total number of virtual CPU cores.


 1. CPU virtualization computing

Calculation formula: total resources = server CPU number * single CPUx core number kernel * thread (2 for hyperthreading, 1 for single thread)

(1) The computing power of a CPU

1. 未开启超线程

算力=cpu核心数*主频
2.开启超线程

算力=cpu核心数*2*主频
 
超线程是将一颗cpu通过分时复用的方式变为2个逻辑cpu,操作系统识别到的就是逻辑cpu

(2) Computing power of one server

整个服务器的”算力“= cpu个数*cpu核心数*2*主频

(3) The computing power of the cluster

服务器1+服务器2的”算力“=整个集群的”算力“

(4) Example

For example: A server has four CPUs with a main frequency of 3.0GHZ, each with four cores and hyperthreading. How many VCPU ports and total resources can be virtualized?

Each CPU has 4 cores x 2 threads = 8 threads, and the service department has four cores, that is, four CPUs, so the server can have a total of virtual
VCPUs = 8 x 4 = 32

Total resource=32×3.0GHZ=96GHZ

Generally, one physical CPU can be reused between multiple virtual machines. Therefore, the number of VCPUs that can be used by virtual machines on a single server is greater than the total number of VCPUs.


 2.CPU Qos

CPU QoS (Quality of Service) is used to control the amount of CPU resources used by virtual machines.

  • CPU resource limit: Control the upper limit of the physical resources used by the virtual machine.
  • CPU resource share: defines that when multiple virtual machines compete for physical CPU resources, computing resources need to be allocated in proportion.
  • CPU reserved resource: defines the minimum computing resources allocated to each virtual machine when multiple virtual machines compete for the physical CPU.

Example: A 2.8GHZ single physical machine, three VMs: A, B, C, the shares are 1000, 2000, 4000 respectively, and the reserved are 700MHZ, 0MHZ, 0MHZ respectively. Think about each resource when the CPU is running at full capacity?

(All three) Reserved ——— "Quota———" Quota

  • A=700MHZ
  • B=(2.8GHZ-700MHZ) × 1/3 =700MHZ
  • C=(2.8GHZ-700MHZ)× 2/3 =1400MHZ

(1) Advantages of CPU Qos

The advantage of CPU QoS is that it can improve network performance, improve network reliability and stability, and improve network security and manageability. The disadvantage is that it may increase network latency and reduce network throughput


3.NUMA

NUMA (Non Uniform Memory Access Architecture) non-uniform memory access architecture, a technology to improve the performance of physical servers.

(1) Advantages of NUMA

The main advantage of NUMA is scalability.

The NUMA architecture has been designed to exceed the scalability limitations of the SMP architecture. With SMP, all memory accesses are routed to the same shared memory bus.

This approach works well for a relatively small number of CPUs, but not for tens or even hundreds of CPUs, because the CPUs will compete with each other for access to the shared memory bus.

NUMA alleviates these bottlenecks by limiting the number of CPUs on any one memory bus and relying on high-speed interconnects to connect individual nodes.

 

  • Divide the CPU and memory resources of the physical server into multiple nodes, and the memory access efficiency in the node is the highest.
  • NUMA ensures that the VCPUs on a VM are allocated to the physical CPUs in the same node as much as possible. If the VCPUs of a VM access memory across nodes, the access delay will definitely increase.

  Creation is not easy, please pay attention, like, collect, thank you~ 

Guess you like

Origin blog.csdn.net/yj11290301/article/details/131629196