How many cores to assign to vmware virtual machines
TL:DR Even with Hyperthreading enabled, do not exceed the amount of PHYSICAL cores your machine has.
The General rule for assigning CPU’s is to keep your virtual cpu count at or lower than your physical cpu count. (VMware blog) .
I was curious as to why this was, seeing as generally one can get anywhere between a 10-30% increase in performance with hyperthreading.
To see how the performance scaled with each additional core, I decided to test it out on my laptop (1CPU, 2 Cores, 4ht cores). I spun up a new CentOS 7 machine and ran geekbench4 on each core configuration. The results were as follows
|CPU’s||Cores||Single-Core Score||Multi-Core Score||% Increase|
From our table we can see that after we arrived at the physical CPU count, adding extra cores gave us very little in terms of a performance boost.