VMware Cloud Community
timbo475
Contributor
Contributor

ESXi 5.5, vCPUs and hyperthreading

Hi all,

I've been reading a fair bit around this subject but I'm still a little unsure about the best vCPU setup when taking hyperthreading into account. In my case I'm talking about a theoretical environment with one VM per host, and the VM has the maximum number of vCPUs.

I read one blog that discussed the idea that ESXi prefers to use physical cores rather than hyperthreaded vCPUs, and that you should not expect ESXi to utilise the hyperthreaded vCPUs in the same way that it utilises physical cores, and it made sense.

However, what would this mean in practice in trying to use as many vCPUs as possible?. On the hosts, I've got 2 sockets, 8 cores on each socket with hyperthreading. ESXi tells me I've got potentially 32 vCPUs but this isn't technically right is it (i.e. the additional vCPUs due to hyperthreading aren't in reality extra vCPUs - they'll give some improvement but not an additional 100%)?

What I'm trying to do is maximum CPU load-testing to measure temperature rises in the server/cabinet, and therefore trying to max out the physical processors. If I assign 32 vCPUs, the VM thinks it's running 32 CPUs @ 100% but the host is only around 70%. Obviously there's some host overhead but surely not 30%? I've played around with different setups (presenting only 16 vCPUs to a VM then getting the guest OS to max 16 CPUs out, also presenting 32 vCPUs to VM and then getting guest OS to max 32 CPUs). If I look at the vSphere performance monitor, all the vCPUs appear to be getting the same workload. Essentially, the hardest I seem to be able to push the host to is 70%.

How can I make the guest OS's use closer to 100% of the hosts CPU resources? I kind of wonder whether I should turn hyperthreading off to simplify the environment.

Cheers,

Tim

0 Kudos
1 Reply
SpoonTuxedo
Enthusiast
Enthusiast

The Vcpu usage doesn't directly relate to what the physical CPU / Cores are doing.

You're correct in that hyper threading doesn't provide 100% improvement on performance. If you want to push the host CPU closer to 100% then you need more VM's and more Vcpu assigned. In saying that % Utilization isn't the only metric to go by. I suggest using esxtop and looking at the CPU metrics to see what is going on there.