Hyper-Threading - Pros & Cons (continued)

To understand where Hyper-Threading can do good you have to understand when execution units are idle. Obviously the instruction composition of a thread will determine what execution units are in use but there are other situations that create moments of idle utilization.

One of the biggest issues with the Pentium 4's 20-stage long pipeline is that branch mis-predicts will result in a severe performance penalty. An incorrectly predicted branch will flush the contents of the pipeline and leave execution units idle until the thread is sent through the pipeline once more. With HT enabled, another thread could be in the pipeline and continue to use the execution units while the CPU recovers from the other thread's mis-predicted branch.

Another situation where execution units remain idle is when you're processing data streams using instructions that inherently take longer to execute than simpler ones. The problem with streaming situations is that there are usually very long dependency chains where you cannot execute multiple instructions in parallel because the outcome of one operation is necessary in order to process the next instruction. This is quite common with video encoding which is why we see such large performance increases with HT enabled in our DiVX tests. Remember that in order for us to see a performance gain while running a single application, the application must be multithreaded so it can dispatch more than one thread to the CPU at a time.

Finally we have a situation that everyone finds themselves in - your CPU's execution resources remain idle when your CPU is waiting on main memory to provide data for an operation. You can't add numbers you don't have so until the CPU gets the data it needs its units remain idle; here's where running two applications simultaneously can benefit from Hyper-Threading. When one thread is going to main memory the other thread could be having its way with the execution units thus improving efficiency.

Luckily we have a number of situations we can use to describe how multitasking can let Intel's Hyper-Threading spread its wings, so let's get to it:

The first situation is relatively basic; we're converting a PowerPoint presentation to PDF format while scanning a the system32 directory for viruses using Norton AntiVirus 2003:

PowerPoint-to-PDF Conversion + NAV2003 Virus Scan

PowerPoint
(Time in Seconds)
NAV2003
(Time in Seconds)
Intel Pentium 4 3.06GHz
54.8
85.0
Intel Pentium 4-HT 3.06GHz
57.8
53.0
AMD Athlon XP 2800+
62.1
19.0

Here you can see that enabling Hyper-Threading makes the PowerPoint task take 3 seconds longer, but it reduces the virus scan time by over 30 seconds. Unfortunately, even with HT enabled the Pentium 4 isn't able to deliver times quite as quick as the Athlon XP 2800+. What is important to note here is that Hyper-Threading does have a significant positive impact on performance.

Next we've got a Word document that's being converted to a PDF in the foreground, meanwhile we're scanning the C:\Windows\System32\ directory for viruses using McAfee's Virus Scan 7:

Word Doc-to-PDF Conversion + McAfee 7 Virus Scan

Word
(Time in Seconds)
McAfee 7
(Time in Seconds)
Intel Pentium 4 3.06GHz
83.0
42.0
Intel Pentium 4-HT 3.06GHz
72.0
35.0
AMD Athlon XP 2800+
81.0
35.0

This time enabling Hyper-Threading improves performance in both tasks, shaving 11 seconds off (13%) of the Word task and 7 seconds off (17%) of the McAfee task. The Athlon XP is able to perform just as well in McAfee but is slightly slower in the Word conversion test.

Finally we're converting an .avi to DiVX format while copying a 100MB directory:

DiVX Encoding + File Copy

DiVX Encode
(Time in Seconds)
File Copy
(Time in Seconds)
Intel Pentium 4 3.06GHz
92
220
Intel Pentium 4-HT 3.06GHz
79
185
AMD Athlon XP 2800+
75
244

Once again we see performance improvements in both tasks, lending support to this idea of multitasking benefiting from Hyper-Threading.

Hyper-Threading - Pros & Cons Hyper-Threading - It's getting Hot in Here
Comments Locked

2 Comments

View All Comments

Log in

Don't have an account? Sign up now