HYPER-THREADING TECHNOLOGY INTRODUCTION: Also called HT Technology, hyper threading was developed by Intel for use in Pentium 4 and Xeon processors. It is the process of executing two "threads" of information simultaneously. This allows the CPU to act as though it were 2 separate CPU's. It uses additional registers to overlap two instruction streams in order to achieve an approximate 30% gain in performance. Multithreaded applications take advantage of the Hyper-Threaded hardware as they would on any dual-processor system; however, the performance gain cannot equal that of true dual-processor CPUs. DEFINITION:
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
HYPER-THREADING TECHNOLOGY
INTRODUCTION:
Also called HT Technology, hyper threading was developed by Intel for use in
Pentium 4 and Xeon processors. It is the process of executing two "threads" of information
simultaneously. This allows the CPU to act as though it were 2 separate CPU's.
It uses additional registers to overlap two instruction streams in order to achieve an
approximate 30% gain in performance. Multithreaded applications take advantage of the
Hyper-Threaded hardware as they would on any dual-processor system; however, the
performance gain cannot equal that of true dual-processor CPUs.
DEFINITION:
Hyper-Threading technology is a groundbreaking innovation from Intel that
enables multi-threaded server software applications to execute threads in parallel within each
processor in a server platform. The Intel® Xeon™ processor family uses Hyper-Threading
technology, along with the Intel® Net Burst™ micro architecture, to increase compute power
and throughput for today's Internet, e-Business, and enterprise server applications.
This level of threading technology has never been seen before in a general-
An example of the pre-packaged executables output is shown below in Figure:
Monitoring hyper-threaded CPUs within Windows operating systems can be
accomplished via PerfMon.exe. As previously mentioned, the OS recognizes a single
Hyper-threaded CPU as two logical processors.
Application of hyper threading:
For the desktop, video editing represents a computationally intensive desktop
application for which HT can offer noticeable performance benefits. Intel describes in a white paper
how, hypothetically, the CPU would read a stream of uncompressed video and would process the
special effects in real time while the processed video stream would then be stored onto a disk in this
application. This problem can be particularly performance sensitive if the special effects have to be
applied to a live video stream, Intel says. The time available to process each frame of video is finite
and should be processed before the next frame arrives.
With threading, a few pieces of information are crucial to the success of the threaded version. If the
special effects to be performed on each pixel of the video frame are complex, for example, then the
function will meet the computationally intensive criteria to which HT applies. Depending on the size
of the video frame, the processing of each frame can be divided into multiple parts and each can be
concurrently processed using threads. This translates into what Intel calls a "data decomposition
problem," which applies to the time allotted for each thread-processing task.
In any threaded design, the first areas that are targeted comprise the most time processor
consuming areas in the code. In the hypothetical video editing example, the application of special
effects to the video frame is the most time consuming task, followed by the I/ O to read and write a
frame. The main thread acts as a master thread and divides the current video frame into four parts in
the setup phase .Once the data has been set up, the master thread wakes up the three other threads and
all four threads, including the master, operate on its unique section of the video frame. Once the
threads are done processing their share of the data, they wait at a barrier for all threads to complete
their sections of the frame. The master then suspends all of the worker threads and writes the
processed frame to disk before reading the next available frame from the stream.
Are there any licensing issues?
Each logical processor that is contained within a Hyper-Threading processor
appears to the operating system as an individual processor. This means that tools or services
within Windows that display information about processors, such as the Windows Task
Manager or Windows Performance Monitor, will display processor information for every
logical processor that Windows is utilizing.
Intel’s processor identification methodology has been updated to support the software
identification of Hyper-Threading using the CPUID instruction. Operating system and
application software can use this identification mechanism to detect the presence of Hyper-
Threading processors and to provide support for features such as Hyper-Threading-aware
product licensing. Windows .NET Server supports an API that provides the logical to
physical mapping for the processors in the system. The current Windows operating system
licensing model for Hyper-Threading-enabled systems is to require a processor license for
each physical processor. However, it is important to note that any software product that was
released before the introduction of Hyper-Threading will not support Hyper-Threading
detection and will treat each logical processor as if it were an individual physical processor.
This licensing model applies to all 32-bit versions of Windows XP and Windows .NET
Server. This model delivers the performance benefit of utilizing both logical processors for
each processor that the Windows license supports. The processor limits which result from
this licensing model for 32-bit versions of Windows .NET Server and Windows XP are
shown below.
If seventeen
Hyper-
Threading
processors are
listed by the
BIOS,
Windows .NET Data enter Server will exhaust the 32-processor limit using both logical
processors on the first 16 physical processors listed. The operating system will not use either
logical processor on the seventeenth physical processor. As described earlier, utilizing a
single logical processor on an idle physical Hyper-Threading processor provides better
performance than utilizing the second logical processor on a physical processor that already
has an active logical processor.
As a result, Microsoft’s recommendation for systems that contain more than 16 physical
Hyper-Threading processors is to disable Hyper-Threading at the BIOS before installing or
booting Windows. Because the performance benefit provided by the second logical
processors in a Hyper-Threading system decreases as the number of physical processors in
the system increases, it is not anticipated that the lack of Hyper-Threading support on
systems with more than 16 physical Hyper-Threading processors will have a significant
impact on the performance of the system.
Hyper-threading in Linux:
Windows Version
Maximum
Physical
Processor Limit
Maximum
Logical
Processor Limit
Windows XP Home Edition 1 2
Windows XP Professional 2 4
Windows .NET Standard
Server
4 8
Windows .NET Enterprise
Server
8 16
Windows .NET Datacenter
Server
32 32
In order to make use of Hyper-Threading in Linux, you will need Hyper-Threading enabled in kernel. But how can you find out if your CPU supports HT? We can get the information from our running Linux system about its CPU by looking into /proc. For example, bellow you can see the output taken from a Xeon system:
Inside the flags section we are looking for a “ht” flag. If it is present, this means that the system supports HT.Let’s look on another sample taken from a Pentium4 CPU (the un-needed infos were removed):model name : Intel(R) Pentium(R) 4 CPU 3.20GHzcpu MHz : 3192.092
Again this system also supports HT. If you don’t see the HT flag, then your system doesn’t support HT. Obviously this will not be available on AMD processors as this is an Intel technology (this might not be true anymore with newer AMD CPUs). Here is an example from an AMD Opteon system:model name : AMD Opteron(tm) Processor 242cpu MHz : 1593.326
If your CPU supports HT, then you can take advantage of this technology only if HT support is enabled in your running kernel. You can either install a kernel provided by your
Linux distribution with HT support (one that has *SMP* inside its name for ex.) or you can compile your own kernel and include HT support.
Once you are running a HT enabled kernel your should normally see the virtual CPU as a regular extra CPU (you will see 2 CPUs on a single CPU system, 4 CPUs on a dual processor system, etc.). You can easily check this with:
cat /proc/cpuinfo
If you still see only one CPU even after you have installed a HT enabled kernel, then you might want to check:
HT is not disabled in BIOS. APCI is enabled in BIOS.
Threading Compilers:
Intel's new HT compiler tools run the gamut of programming applications, Intel says. Version 7.0 of Intel C++ and Intel Fortran compilers for Windows and Linux can improve the performance of applications for Intel Itanium 2, Intel Xeon, and Intel Pentium 4 processor-based systems up to 40% compared to compilers currently available from other vendors, Intel claims.
Specific to HT, the Version 7.0 Intel compilers include an auto-parallelization option that automatically looks in applications for opportunities to create multiple execution threads and enhancements to OpenMP, an open standard that enables the use of high-level directives to simplify the creation and management of multi-threaded application software.
Conclusion:
Whether you want desktop or laptop computer, HT technology is available in most computer types including servers and workstations. HT makes us to work more fast and high performance.