vCPUs are vir­tu­al­ized versions of physical CPUs and an el­e­men­tary component of cloud computing. A major advantage of these vir­tu­al­ized computing units is their good scal­a­bil­i­ty, which is why they play an important role in cloud hosting.

What does a vCPU do?

A vCPU (Virtual Central Pro­cess­ing Unit) is the vir­tu­al­ized variant of a physical CPU. In other words, vCPUs are the central control units in virtual machines (VMs) and cloud en­vi­ron­ments. Today’s multi-core proces­sors can not only be used as a single vCPU, but as the basis for multiple virtual CPUs. The number of potential vCPUs is not linked to the number of cores and threads (see mul­ti­thread­ing), but rather to the result of the following cal­cu­la­tion:

(Threads x Cores) x Physical CPU Number = Number of vCPUs

vCPUs are software im­ple­men­ta­tions of physical templates, which are perceived as real processor cores by the operating system. Each virtual machine requires at least one vCPU. However, depending on the scenario, several virtual central pro­cess­ing units can also be assigned if required.

Tip

Want to dive deeper into the topic of vCPUs? Our articles on vir­tu­al­iza­tion and server vir­tu­al­iza­tion provide you with ad­di­tion­al in­for­ma­tion about the features and pos­si­bil­i­ties of virtual computing resources.

What are the benefits of vCPUs?

Virtual CPUs have some sig­nif­i­cant ad­van­tages when compared with their physical coun­ter­parts. The main benefits include:

  • increased scal­a­bil­i­ty
  • improved ef­fi­cien­cy
  • increased flex­i­bil­i­ty
  • lower costs

What’s also great about vir­tu­al­iza­tion is the excellent scal­a­bil­i­ty of hardware resources. The vCPUs used in a virtual machine, for example, can come from several different physical hosts. This means that processor per­for­mance can easily be scaled up as workload increases.

If vCPUs are no longer needed, they can simply be used for other VMs. This is par­tic­u­lar­ly valuable for hosting providers, as the un­der­ly­ing in­fra­struc­ture can be divided up between customers in a par­tic­u­lar­ly efficient manner. Users also benefit from this by being able toflexibly adjust the re­quire­ment for vCPUs. Since there is no fixed hardware setup, it is easier to increase or decrease processor power for cloud servers or virtual private servers.

The ef­fi­cien­cy and scal­a­bil­i­ty of a vCPU is also ad­van­ta­geous when it comes to costs. Several operating systems including the re­spec­tive ap­pli­ca­tion software can be run on the basis of a single host system. This means that the available computing power is used optimally and in many cases, it reduces the need for ad­di­tion­al hardware.

Tip

You can learn more about the dif­fer­ences between vir­tu­al­ized and physical central pro­cess­ing units in our article “CPU vs. vCPU”.

When are vCPUs used?

vCPUs are essential for cloud computing to function. Whenever hardware and software is made available in the cloud, virtual computing units are used. These are used, for example, as part of cloud storage, server hosting or when using a cloud PC such as Windows 365. How many vCPUs are actually required depends on your workload. In many scenarios, one to two vCPUs are enough. For more demanding workloads such as a database, email or gaming server, the re­quire­ments are higher. This is also the case when using physical computing units.

Container platforms such as Docker are another type of vir­tu­al­iza­tion tech­nol­o­gy that relies on vCPUs. Unlike virtual machines, where fully func­tion­al systems are vir­tu­al­ized, container platforms only vir­tu­al­ize in­di­vid­ual ap­pli­ca­tions.

How to calculate the vCPU re­quire­ment

The big challenge in a vir­tu­al­ized en­vi­ron­ment is to provide enough vCPUs without wasting computing power. To work out how many vCPUs you need, you can use the number of physical cores you would need as a reference. For example, if the software (don’t forget the operating system) requires eight physical cores, you should allocate eight vCPUs to the virtual en­vi­ron­ment.

If later on the re­quire­ments increase because you start running more ap­pli­ca­tions si­mul­ta­ne­ous­ly or the project becomes more complex, you can simply increase the number of vCPUs. When the re­quire­ments decrease, simply decrease the number of vCPUs.

For compute-intensive workloads, it is also crucial that vCPUs are assigned to different physical CPUs. For example, if you have hardware with a dual-core CPU (2 physical and 4 logical cores) as a starting point, you should divide the four logical cores as follows for optimal per­for­mance:

  • You assign logical core 0 and logical core 2 to the first virtual machine. These are the first cores of the dual-core CPUs that have been phys­i­cal­ly installed. The resources made available should be suf­fi­cient to execute the workload.
  • Meanwhile, you can use logical core 1 as well as logical core 3 (the second cores of the physical dual-core CPUs) for a second virtual machine for workloads that do not have high demands, for example, a DNS server.
Tip

Want to learn more about proces­sors and CPU? Take a look at the following articles:

Go to Main Menu