Data CenterDeep-DiveHardwareHost ResourcesTop Rated

What is Hyper-Threading ?

Hyper-Threading:

When selecting a CPU for virtual Infrastructure, it is important to know the features required in the physical processor for better performance. Hyper-Threading is one of those features, which in some cases, can boost up the performance by using CPU resources more efficiently and allowing two different tasks to schedule execution resources on the same underlying physical core.

In the traditional processor (or without Hyper-Threading enabled), when a compute task (thread) is in the execution cycle, some CPU resources may still be unused, But in the case of Hyper-Threading (HT) enabled CPU, An extra set of registers make available of those resources to the second thread and the processor acts like it has two logical cores, yet has only one.

For example, suppose your system has one physical CPU installed with two cores (Dual-core processor); typically, your operating system will see the two logical processors (1 core = 1 processor). Still, if you enable the Hyper-Threading (HT) feature in BIOS, your processor will pretend to have 4 cores, and the operating system will treat like there are 4 logical processors assigned to that.

Hyper-Threading

Hyper-Threading Technology is the proprietary term used by Intel, but the general term is Simultaneous Multithreading (SMT). It allows the processor to schedule two separate execution contexts per core of a physical CPU and a rapid switch between the execution contexts. During the execution of one compute task (thread) other thread goes into a wait state, which means when both the logical processors need to execute the compute task at the same time then one logical processor executes the task. Another processor’s thread has to go into a ‘wait’ state and vice versa. That is why it does not perform as good as two physical core processors.

In VMware vSphere, you can see if the HT is enabled or not in the host’s BIOS. In the above example, when the HT is disabled, it will show only 2 logical processors but in the case of HT enabled, it will show 4 logical CPUs, and you can create 4 virtual machines by assigning 1 vCPU to each. However, you can also create 3 VMs by assigning 1-1 vCPU to two VMs and the rest 2 vCPU to 1 (as shown in the below figure) or 2 VMs by assigning 2 vCPU to 2 VM or 1 VM by giving all 4 vCPU.

When the number of logical processors assigned to VMs is more than the physical core is called over-commitment.

HyperThreading VM vCPU 2

But in the first scenario, if all 4 VMs try to execute their tasks at the same time, they will require 4 physical cores for execution, but in actuality they have only 2 physical cores. In that case, execution resource would be available only for two parallel tasks of two VMs (out of four), and the rest of the two tasks of two VMs would have to be in the wait state. That is why sometimes it seems like the processor is performing slightly down.

If you look at CPU performance in vSphere (in the above scenario), you would see that each logical CPU (vCPU) is 50% utilized, and the physical core would be at 100%.

The below counters for the HostSystem object in vSphere provide this information:
cpu.utilization – Provides statistics for physical CPUs.
cpu.usage – Provides statistics for logical CPUs. This is based on CPU Hyper-Threading

Conclusion:

In all cases, performance is very much dependent on application architecture. It may result in rising as well as fall in performance using Hyper-Threading Technology, So discuss with your application architect before using this technology.

Enjoy 🙂

-Shahzad

Check out some more blogs:

Finally, If you like my blog,  Please Share…

define hyperthreading, hyper threaded, virtual cores, cpu cores, cpu core, physical cpu core, intel core, eight cpu cores, intel hyper threading technology, how does hyperthreading work, hyperthreaded cores, vmware logical processors, hyper threading processor, hyper threading equipped processor, same physical core

5 thoughts on “What is Hyper-Threading ?

  • Kashif iqbal

    Great info . Got my some misunderstanding solved

    Reply
  • Gaurav Kumar

    What is the main agenda for this topic.
    Is it only for Hyper-Threading or some deeper in Hyper-Threading.

    Reply
  • Ervin Lemoyne

    Thank you for a very informative web site. What else may I get that type of info written in such an ideal means?

    Reply
  • I simply want to mention I am all new to weblog and truly loved this blog. Almost certainly I’m planning to bookmark your blog . You surely have tremendous articles. Kudos for sharing your webpage.

    Reply

Leave a Reply