[Wendell]Virtual Machines and Hyperthreading, how do they interact exactly?

So I can't seem to find much on google but I've been wondering for a while.

What is the relationship between hyperthreading and virtual machines?

While I'm not sure about what exactly goes into VM workloads, seems some people need to run a lot of virtual machines. So how does hyperthreading affect this?

Isn't it better to have real cores for each virtual machine?

And so then would this be why it seems AMD chips are better for virtual machine workloads? It seems to be the last and only thing AMD's CPUs are good at right now .


The cores aren't dedicated to a specific vm, unless you were to configure it that way. You could have a dozen VMs each with 4 cores and run that on 6 core physical CPU with no Problems. The CPU will divide up the workload the same way it does dealing with other processes and threads.

So you'd get the same benefit out of hyperthreading with VMs as you would with any other mulrithreaded or multi process environment.

Does it still function well even if you were to say put a different workload on each machine and run them hard most of the day?

Like anything it depends on the workload. If you don't have enough CPU power to go around it's going to be slow whether you have an 8 core or a quad core with hyperthreading.

Imagine it like you were running everything which is running on the VMs on a single machine, how would it perform? That's basically how it works.

I guess if you had 8 VMs all given 1 CPU and they're all running flat out then that will probably perform better on an 8 core CPU over a quad core with hyperthreading, but it also depends how much faster the quad core is. It may perform better if it is just a more powerful CPU.