Intel® Hyper-Threading Technology: Your Questions Answered

Tags:

What is it?
Intel® Hyper-Threading Technology is a performance feature on our new Intel® Core™ i7 processor and the Xeon® 5500 series processors. Put simply, it allows one core on the processor to appear like 2 cores to the operating system. This doubles the execution resources available to the O/S, which potentially increases the performance of your overall system. For the visually-oriented, you can view a graphical explanation of Intel® Hyper-Threading Technology by clicking on the demo here.

Talking about cores, threads, and Hyper-Threads can get a bit confusing. To make things simple for the rest of this article, Hyper-Threads will be called hardware threads, and O/S level threads software threads. Just as a refresher, a core is 1 CPU. Each Core™ i7 or Xeon® 5500 series processor shipping currently has 4 cores (we may offer other versions in the future).

How can I tell if my system is using Hyper-Threading Technology?
You must have a processor, chipset, operating system, and BIOS that all support the technology. Luckily, that is not much of a problem. Many of the desktop and server platforms that ship with Nehalem-based processors include this support. Most of these platforms will allow you to enable or disable Hyper-Threading Technology as a BIOS option (it should be enabled by default). You can view your CPU information using the Task Manager in Windows*, and /proc/cpuinfo in Linux*. If you have a supported platform and Hyper-Threading is enabled, you should see twice the number of CPUs as you have physical cores in your platform. For example, if you have a dual-processor Xeon® 5500 series server, you should see 16 CPUs. (16 hardware threads running on 8 physical cores, 2 threads per core.)

HyperThreading_Disabled.JPG  HyperThreading_Enabled.JPG
Available CPUs on the same platform with Hyper-Threading Technology enabled (right) and disabled (left).

Can I run 2 applications simultaneously on 2 different threads on the same core?
Yes. The 2 software threads running on a single core do not have to be threads of the same process. They could be (in the case of multi-threaded software), or they could be from 2 separate applications. Which 2 software threads would run on the 2 hardware threads of a Hyper-Threaded core would be up to the operating system. So, yes, you could have 2 different applications running on the same core at the same time. (Whether you would get equal performance in this scenario as you would with the 2 apps running on separate cores is a different issue – see question 6.)

How is it implemented, under the covers?
The entire pipeline of the Nehalem-based processor core is set up to recognize 2 separate streams of instructions (one for each hardware thread). Various events cause the pipeline to switch from decoding and dispatching one stream to decoding/dispatching the other stream. All the resources in the pipeline are either shared or duplicated amongst the 2 hardware threads. For more information, see the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1, section 2.2.7.

Can I give one hardware thread priority or ensure that it doesn’t get “starved” for execution time?
As a developer, there are various ways you can optimize your code for Hyper-Threading (all having to do with optimizing your code for threads in general); however – you can’t exactly give one thread priority. (Although there are some O/S level tools that allow you to assign priorities to processes and pin those processes to specific hardware threads.) The Hyper-Threading implementation does ensure that one hardware thread would not be starved. What you can do is use tools such as Intel® VTune™ Performance Analyzer and Intel® Thread Profiler to diagnose whether you are using your hardware threads efficiently and optimize things.

What kind of performance benefit will I get from using Intel® Hyper-Threading Technology?
There are many different ways in which Hyper-Threading Technology can provide a benefit. On a desktop system, it can allow a user to run more applications at once. For a developer, it provides more cores on which to run software threads. On a server with high CPU utilization, it can open up more performance on each core. In general, you will see the most benefit from Hyper-Threading when running software threads that experience large memory or other latencies. Suppose for example you have 2 software threads running on 2 hardware threads both running on the same core. If the 2 software threads each have some I/O, long memory access, or sleep times then you are more likely see a significant benefit from Hyper-Threading. (Because having 2 hardware threads allows for more efficient use of resources during long periods of waiting.) Many review sites have published benchmark results showing the benefit of Intel® Hyper-Threading Technology as well.
Finally, one last thing to note is that you can still run single-threaded applications on a platform with Hyper-Threading enabled. Intel® Hyper-Threading is designed to not reduce the performance of single-threaded applications.

For more complete information about compiler optimizations, see our Optimization Notice.

Comments

TC2009074's picture

http://www.intel.com/technology/product/demos/multi/demo.htm?iid=tech_multi-core+body_demo

check out the video for understanding hyper-threading in simple terms

's picture

Can I able to disable Hyper threading in Intel Atom processor?

's picture

@Uttama
Yes, you are able to disable HT on intel atom CPU.

My questuion is, how does disabling of HT influe the heat of the CPU and working time of the netbook?

's picture

I have a Lenovo G560 with a i3 m330 processor.In system task manager under win 7 32bit I see four CPU usage history windows - does this mean I am using HT technology ? If not,how can I enable it ? Am I supposed to install some drivers or what ? As far as I am concerned,my processor does not support intels Turbo Boost Technology - if it does,how can I enable this feature.Thanks in advance !

Aubrey W. (Intel)'s picture

Hello Dimitar, The Intel® Core™ i3-330M Processor has two cores, so if task manager is showing four, then Intel(R) Hyper-Threading Technology is enabled. It may be enabled by default. To disable or enable it, you should seek support from the operating system vendor. By the way, you can find the specs for your processor at http://ark.intel.com.

's picture

hi,can anybody tell me how to disable HT ,even at the first time window restart,i pressed F12 and it get me to the bios sysytem,but at the HT it already enable,and i tried to disable it ,but it cant,can anybody tell me how?

's picture

I'm looking into few intel processors more specific i5-2500 vs i5-650 and i5-2500k vs i5 - 670. I like alot of the features that the 2500(k) series has to offer, but i like the the hyper thread technology. Is the hyper thread technology worth of the other features that you loose by going from 2500 series to 600 series? Thank You.

's picture

OK!... Intel uses WINDOWS for testing and benchmarking it's products. That too Windows task manager.

's picture

Assuming HT is turned on with a single dual-core chip, and I'm running a workload of threads which does NOT "have some I/O, long memory access, or sleep times". For example, work that can done on chip with on-chip caches. On a highly loaded system of this type running Linux, I look at "top". I see 4 "Cpu's". At full load, would they be 50% utlized? Is it fair to say that in this situation, each thread is receiving "half-time" on the CPU?

's picture

Can you please list out the intel processors supporting hyper threading?

Pages