Wednesday, May 7, 2014

What is Hyperthreading and what are its Benefits?

Hyper-threading technology from Intel has been on their computer processors for over 10 years and yet much same as the elusive Fox, most people know very little about what it says. Let us start with an analogy. Let us say I am a CPU and I am trying to process food, or eat as some people call it. I can only do as much eating as one mouth can do if I could add more mouths than I could process more. This is what multi-core processors do but due to cost constraints among other things, it is not always possible to take that approach, so I have got just one mouth I can use my hand to pick up the food, bring into my mouth, then grab another bite while my mouth is busy. If I finished chewing before my hand is ready to deliver me more food, however, then my mouth is just sitting there doing nothing. If only I could use two hands to prepare food for my mouth then even though my mouth cannot actually work any faster I would not waste any time. Oh wait I can do that. 

That's hyper-threading - one processor and intelligent scheduling to make sure that it is always working. This is awesome. Well, usually. Hyper-threading cannot do much for single threaded workloads where you can only work on one thing at a time. For example if you wanted to eat a two scoop ice cream cone you can't work on the bottom scoop until top scope has already been consumed and heaven help you if you try to keep the cold first. In this example, there is no benefit to adding more mouths or more hands. The opposite of this would be eating from a bowl of candies. Grabbing and eating a red candy does not dependent on finishing the blue candy that is already in my mouth in fact if I had some friends to help me eat it, we could consume the candy very quickly by adding more hands and more mouths. This is an example of a multi-threaded workload and hyper-threading can definitely help with this.

Alright, let us break away from the eating analogy for a minute and bring it back to the real world computing tasks that benefit from hyper-threading and multiple processing cores are video editing, 3D rendering and heavy multitasking on your PC. Video editing is a great example because one frame of a video can be processed well the next one is queued up because the video is already shot. The PC does not have to guess what is going to be in the next frame, it already knows.

Here is another multitasking example. One processor can be handling your light tasks and the other one can focus all its attention on running a power-hungry video game in the foreground. So with that out of the way, how do you actually choose a processor for your PC? The first thing I hope you get out of this is that whatever task manager might say hyper-threading is not the same as doubling your processing cores. It is a clever trick for more efficient scheduling of the work that is done by the processing cores that you have. It also increases power consumption and heat output a little bit but the benefits usually outweigh this drawback. In the real world, you can get huge double-digit performance improvements all the way to No performance improvement at all. Moreover, in very rare cases, even very slightly decreased performance depending on how the software is optimized. Therefore, it is important to do your research about the software you will be running. If the work you do is not heavily multi-threaded then you might do just as well to save your money and buy a processor that does not have hyper-threading. Most games right now for example can take advantage of more than a couple of threads. however if the work you do is heavily multi-threaded them remember this general rule hyper-threading is better than no hyper-threading but is not nearly as good as adding more physical processors. In an ideal world, many physical processors each with hyper-threading will rock.


Previous Page Next Page Home

Related Posts: