Hyper-V – Should Hyper-Threading Be On or Off?

hyper-vhyperthreading

With the new Xeon CPUs supporting Hyper-threading, what is the current wisdom with regard to using it (or not) on a Hyper-V host machine?

I was originally under the impression that turning it on in a virtual host environment could be detrimental as the 'extra' CPUs were not true cores. However I've also read (unconfirmed) comments along the lines of MS doing some hard work to get Hyper-V running well in a Hyper-threading environment.

Does anyone have any solid information or experience in this regard? Cheers!

Best Answer

The old problem with Hyper-Threading in Virtual Server 2005, without getting overly technical, is the CPU cache was being poisoned, i.e. it was caching almost nothing because the contexts of what was happening on each thread were unrelated - causing them to compete for the on-chip cache.

Newer chips have larger and smarter caches so this is less of a problem.

Is it ideal to have on or off? That really depends on workload. If both threads happen to be running the same VM and the same task, then it would almost certainly be a BIG advantage to have on. If they were doing unrelated things with a lot of random RAM I/O (several different VMs for example) it would cause only half the chip's cache to be available to each - which in theory could be slower - In reality it rarely is anymore.

If you have older generation chips though you may want to check the chip cache sizes: In virtualization the larger cache you can get the better. RAM truly is MUCH slower than CPUs - just not NEAR as bad as disk drives.

NOTE: What you are reading that says "turn off" was found regarding the chips that were single core with Hyper-Threading - For example this was official answer back in the day (2005/2006?) - http://www.VirtualServerFAQ.com/tiki-index.php?page=VirtualServerHostDualCore

Steve Radich http://www.VirtualServerFAQ.com