Version: 2008
advertisement
Labs:
Inside Intel's 3GHz Pentium 4 with Hyper-Threading


Hyper-Threading explained
Hyper-Threading technology will be included in all P4 processors that are 3.06GHz and faster. In fact, the rumor is that Hyper-Threading has actually been in the P4 from the very beginning, but the function was disabled on the CPU die until now.

In order for Hyper-Threading to work, you need to have all of the correct pieces in place. In addition to a Hyper-Threading-enabled CPU, you also need a motherboard chipset that supports the technology. With the exception of the Intel 845G A-stepping chipset, all 533MHz frontside-bus-capable Intel chipsets support Hyper-Threading. Your system also needs to have an updated BIOS and drivers for Hyper-Threading support. Last but not certainly not least, you need an operating system that is optimized for Hyper-Threading. According to Intel, your current choices are Windows XP (Home and Professional) or Linux 2.4.x.

But before we go into detail as to what exactly Hyper-Threading is, there is one important point to make about what Hyper-Threading is not. Contrary to what some in the press have claimed, it is not two CPUs for the price of one. Intel has bandied around different sets of numbers, but the most frequent Intel claims show up to a 25 percent performance gain from Hyper-Threading. A number of variables are at play that determine just how much of a performance gain--if any--you'll actually see, and there are even times that Hyper-Threading can actually hurt performance.

Though you're not getting two CPUs for the price of one, it might look like you do, at least as far as the OS is concerned. Although there is only one physical CPU, the OS sees two logical processors. With the right mix of code making its way to the single physical processor, instructions go to both logical processors and execute simultaneously. Having the right mix of code, of course, is the key that determines if you'll see any benefit from Hyper-Threading. This code comes in two flavors: multithreaded and multitasking applications.

click to enlarge
There is only one physical processor, but the OS sees two logical processors.

A multithreaded application is one that has been specifically designed to break up its instructions into multiple streams, or threads, so that multiple processors (either physical or logical) can process the streams concurrently. With multiple streams of an application running independently, a processor can execute one application stream while not having to wait for another stream from the same application to complete. Until now, most multiprocessor environments used multiple physical processors in an SMP (Symmetric Multi-Processing) architecture, which is typically found in high-end servers and workstations. As a result, there are very few mainstream consumer or business applications that are multithreaded today; Adobe Photoshop and Windows Movie Maker are but a few multithreaded mainstream apps on a very short list. Most of today's mainstream apps are single threaded, where an application's streams are executed sequentially.

This doesn't mean, however, that the vast majority of today's applications won't see gains from Hyper-Threading. Even single-threaded apps can reap performance benefits from Hyper-Threading, as long as more than one app is running at the same time (in other words, multitasking). While one application is sending its streams (threads) to one logical processor, a second application is simultaneously sending its streams to the second logical processor. However, if you run only one single-threaded application, you won't see performance gains with Hyper-Threading. In fact, because of the overhead associated with managing the two logical processors of Hyper-Threading, it's even possible to see some performance degradation when running only a single-threaded app.

Whether the apps are multithreaded or multitasking, Hyper-Threading works the same way. It is rare that a single thread will use up all of the available processor resources in a given CPU cycle. Therefore, a second thread from either a multithreaded or a multitasking app can be processed by the second logical processor using the idle CPU resources not already utilized by the first thread. When it all works as designed, the total work of the two threads gets completed in a shorter number of CPU cycles.


click to enlarge
Each logical processor can process a different thread simultaneously.

The Hyper-Threading elements add only about a 5 percent increase to the processor's die size. This is accomplished by allowing most of the CPU resources to be either partitioned and/or shared by the two logical processors. Very little of the CPU architecture is actually dedicated to each logical processor. Other than the jump in speed to 3.06GHz and enabling the Hyper-Threading functionality, the core architecture of the processor is exactly the same as the most recent iteration of the Northwood processor design (see "The littlest P4"). For an in-depth look into Hyper-Threading technology architecture, take a gander at Intel's white paper.

IntroHyper-Threading performance