Understanding Hyper-Threading: It's not a perfect world

Remember those two threads from our earlier example? Let's now assume that our simple CPU features Intel's Hyper-Threading technology and see what happens when we try and simultaneously execute those two threads:

Just as before, the blue boxes indicate that an instruction from thread 1 is being executed while the green boxes indicate than an instruction from thread 2 is being executed. Gray boxes indicate an unused execution unit while the red boxes indicate a conflict where two instructions are attempting to be fed to the same execution unit.

All of the sudden our quest for tender love and parallelism (TLP) has been rewarded with less utilization of our execution resources. Instead of being able to execute both threads in parallel, our CPU will now execute both threads much slower than a non Hyper-Threaded processor would. The reason behind this is actually quite simple; we were attempting to simultaneously execute two very similar threads, both consisted of ADDs, loads and stores. Had we been running a floating point intensive application alongside whatever integer application we were using then we'd be in a much better situation. The real question is, what is more characteristic of the way we use our PCs?

Currently, the way most desktop users use their PCs is much like the example we gave at the beginning of this section where the CPU is given very similar operations to execute. The unfortunate reality here is that with very similar operations there comes additional overhead in managing and dealing with what happens when you run out of one type of execution unit and have twice as many instructions requiring its use. In the majority of cases, if you were to enable Hyper-Threading on a desktop PC you would not see a performance increase, rather a 0 - 10% decrease in performance.

On a workstation there is more potential for Hyper-Threading to result in an overall performance gain, but the term workstation is so broad that it can mean everything from a high-end 3D rendering system to a heavily used desktop PC.

The area where performance gains are the most likely today is under server applications because of the varied nature of the operations sent to the CPU. Transactional database server applications can see a 20 - 30% boost in performance just by enabling Hyper-Threading. Lesser but tangible gains can be seen on web servers as well as other application areas.

Introducing Hyper-Threading Gaining more from Hyper-Threading
Comments Locked

1 Comments

View All Comments

Log in

Don't have an account? Sign up now