in Virtualization

Virtualization: Should I assign CPU’s or Cores

TL:DR Cores Cores Cores (but no more than pCPU count)

When creating a new virtual machine in VMware ESXi or VMware Workstation, it asks you how may processor cores you wish to set and gives you the option to set both ‘Number of processors‘ and ‘Number of cores per processor‘.

Most places online (looking at you Stack Overflow) said that only ‘Total processor cores‘ matters. I was curious as to how true that was and decided to run some tests myself.

The results are as follows

CPU’s Cores Single-Core Score Multi-Core Score % Increase
1 1  3159  2976  base
1 2  3161  4758  ↑60%
1 4  3055  5068  ↑70%
2 1  2991  4820  ↑62%
4 1  2960  4931  ↑65%
2 2  2913  5060  ↑70%

The results here were pretty astonishing, as soon as we increase the CPU count we actually lost single-core performance and gained a slightly higher multi-core score.

This may be because of the way VMware handle cores vs CPU’s. It could also be because of how the guest operating system handles multiple processors. Regardless, seeing as single-thread performance is more important in most applications, I’d stick with adding cores and not processors for the time being.

Write a Comment