Hi,
The physical core on ESXi needs to be calculated.
(Physical socket) x (core) = Indicates the total amount of physical CPU, ie pCPU. If HT is not active in the environment, it is the maximum amount of vCPU you can give to the virtual machine.
If HT is active in the environment;
(pCPU) x (2 x core) = Returns the total number of vCPUs.
Now if we proceed with a simple example;
We have a server with 2 physical sockets, each with 16 cores. HT is also active on this server. In this case, if we proceed according to the calculation above;
(2 sockets) x (16 cores) = There are 32 cores in total. If HT is not active, this is the maximum amount of CPU you can give to a virtual server. However, since HT is active, we continue to calculate.
Since (32 core) x (2) = HT is active, our total vCPU amount, that is, the maximum CPU amount we can give to the virtual server is 64.
Now let's come to the real question. We have a server with a capacity of 64 vCPU. How many virtual machines can I host on this server? First of all, as I mentioned above, you can also use resources that you don't have thanks to CPU overcommitment. In this case, you can create 10 virtual servers with 64 vCPUs. A total of 640 vCPUs may have been assigned, but virtual servers cannot use so many resources. Why? Because the physical resource on ESXi is not that much. So if you give this much CPU, it is very likely that you will experience performance problems. For this, VMware proposes the following rates and asks you to calculate accordingly.
According to the account we made above, we have 64 vCPU capacity. According to this account;
1: 1 = If you keep the total number of vCPUs assigned to virtual servers created under ESXi 64 or less, you will not experience any performance problems. I recommend that you use this rate only and only in environments where you have very critical workloads.
2: 1 = You can give a total of 128 vCPU resources to the virtual servers you create on ESXi if you want to use the 2: 1 ratio here. When you choose this rate, you will not experience any performance problems.
3: 1 = If you want to use the middle of 3: 1 here, you can give a total of 192 vCPU resources on the virtual servers you create on ESXi. When you choose this rate, there may be some small or low changes compared to the previous two configurations.
4: 1 = If you want to use the middle of 4: 1 here, you can give a total of 256 vCPU resources to the virtual machines you create on ESXi. This rate is actually the most optimal rate recommended.
If you use the 5: 1 or 6: 1 ratio here, you may experience serious performance problems. If you are using VDI media, you can use 5: 1 or 6: 1 ratios.
On the VMware side, if you absolutely want to follow a rule and wonder how the rates should be, you can use the rates I mentioned above. The rates stated here are actually purely architectural decisions. You may never want to overcommit the CPU side and use it in a 1: 1 ratio. Yes this is possible. If you think of a different scenario, you can use a ratio like 10: 1. Of course, this ratio will cause you various performance problems. However, there is no obstacle in your use. If you do not overcommitment, you cannot use CPU resources more effectively and efficiently.
Fiziksel CPU / Sanal CPU Oranı