Analysis of the relationship between cloud host core number, memory and operating performance

4c8g or 4h8g represents CPU and memory configuration, 4c8g refers to 4-core CPU, 8G memory

Analysis of the relationship between cloud host core number, memory and operating performance
What is the core of a cloud host?

A cloud host is like a virtual computer that runs on a cloud server. Each cloud host has its own virtualized operating system, disk and network interface, etc. What controls these components is the cloud host's kernel. The number of cores of a cloud host refers to the number of threads that the core can process data at the same time.

CPU unit

CPU resources are measured in CPU units. In Kubernetes, a CPU is equivalent to:

  • 1 AWS vCPU
  • 1 GCP Core
  • 1 Azure vCore
  • One Hyper-Threading (on bare metal Intel processors using Hyper-Threading)

Decimals are allowed. A container requesting 0.5 CPUs is guaranteed half as many CPUs as a container requesting 1 CPU. You can use the suffix m for milli. For example, 100m CPU, 100millicpu and 0.1 CPU are all the same. The accuracy is not allowed to exceed 1m.

CPU is always asked as an absolute quantity, not a relative quantity; 0.1 CPU means the same number of CPUs on a single-core, dual-core, or 48-core machine

The relationship between the number of cores and memory configuration of cloud host

The running performance of a cloud host is not only related to the number of cores, memory is also a very important factor. Memory refers to the random memory capacity available to the cloud host, which determines the amount of data that the cloud host can process at the same time.

In fact, the number of cores and memory configuration of the cloud host are related. Although the main function of memory is to store data, it also affects the number of processes on the cloud host. If more processes are used than available memory, it is likely to cause insufficient memory, thereby reducing the performance of the cloud host.

Therefore, when choosing a cloud host, you need to comprehensively consider the number of cores and memory configuration based on your needs. Generally speaking, if you need to process a large amount of data and support multiple services at the same time, you should choose a higher configuration cloud host, such as a 4-core 8G or above configuration; and if you only need to run some simple applications, such as For static websites, a configuration of 1 core and 2G or above is sufficient.

https://zhuanlan.zhihu.com/p/269743409

Guess you like

Origin blog.csdn.net/qq_39813400/article/details/131171337