Using Hyper-threading to elevate processor performance

Source: Internet
Author: User
Tags execution

Processor designers always focus on different performance promotion strategies in order to perform as many computations as possible within each clock cycle. Faster frequencies, larger data paths, and different instruction sets improve performance. However, one aspect of performance improvement that is most likely to cause misunderstanding is the impact of hyper-threading on processor performance.

Hyper-Threading can increase processor efficiency has been proven, but it does not apply to all scenarios, and modern processor design may make hyper-threading obsolete.

How Hyper-Threading works

Traditional Processor Queue Instructions pass through the pipelined architecture before being transferred to the processor's execution engine. Application design and requirements differences always leave gaps in the processor's instruction pipeline, resulting in an idle processor clock cycle. Poor programming can waste clock cycles and degrade processor performance.

To optimize the processor architecture and increase the likelihood of multitasking, the processor designer adds a level two pipeline that shares the execution engine with the first level of the pipeline. The designer wants a second thread or task-related instruction to be queued in a single pipe, and then run the instructions by executing the core when the first instruction pipe is idle. Intel has developed hyper-Threading technology, which enhances multithreading parallel processing on computer systems.

The second-level instruction pipeline is included in the processor core, and the operating system recognizes two separate processors. Applications that can decompose activities into separate tasks can take advantage of processor Hyper-Threading technology. A separate sequence of instructions helps the processor dispatch workloads to effectively use its command engine, which in turn increases the core's computational power.

However, the processor core still has only one execution engine, so the performance improvement caused by hyper-threading depends on how the workload being dispatched is designed and implemented. Performance improvement will never exceed the increase by adding a second core, adding a second core typically multiplies the processor's computational resources.

What conditions are required before hyper-Threading is implemented

processors, BIOS, operating systems, and workloads form the four basic elements that a hyper-threading server should have. Most contemporary operating systems can support hyper-threading: In 2002 Intel introduced the currently sophisticated hyper-threading technology into the Xeon processor, and now Itanium and Atom processors also support hyper-Threading.

However, the processor requires specific hardware and software elements, including a server board to support the BIOS. The mature nature of hyper-threading almost guarantees reasonable support for the BIOS by setting up the BIOS to allow system technicians to enable hyper-threading and related activity.

Because the OS resolves workload tasks and handles task scheduling in the instruction queue, the operating system must also support hyper-Threading. Currently, most enterprise-class operating systems, including some new distributions of Windows Server 2012 and SuSE and Red Hat Linux, support HT and SMT. Check the operating system documentation to verify that the HT supports all data center platforms.

Finally, the application design itself also affects Hyper-threading. SMT applications designed to be able to use Hyper-threading advantages are better than just deploying to enable Hyper-threading servers. Because the processor version, BIOS version, OS version, and application design all affect Hyper-threading, it is difficult to determine exactly how much performance increases.

How hyper-threading affects virtual servers

Hyper-Threading typically improves the performance of a single core processor, but unfortunately processor performance improvement does not necessarily mean that it is more unlikely to exceed multi-core performance advantages. You cannot choose to enable or disable Hyper-threading based on core or slot, and in some cases hyper-threading may have a negative impact on processor virtualization. As a result, many administrators choose to disable Hyper-Threading.

Hyper-Threading technology enhances the way processors organize and schedule application tasks and improves performance. Modern enterprise servers, however, use at least 8 to 10 cores of multi-core processors. In most cases, compared to hyper-threading, the available computing resources can lead to better performance improvements. Hyper-Threading may also have a bad impression of how the processor is virtualized.

For example, virtualization features such as CPU affinity do not always work well when Hyper-threading is enabled. Hyper-Threading creates two logical processors on each core, but these logical processors still share the computational resources of the physical core. Therefore, when a virtual machine or a single SMP virtual machine attempts to use a vcpu that resides on the same physical core, a resource contention may occur and performance bottlenecks occur.

In fact, the number of cores available on the server can cause hyper-threading to waste computational resources. If a server consists of 4 10 cores, then there are 40 cores, and a Hyper-V server running on Windows Server 2008 R2 supports 64 logical processors. If Hyper-Threading is enabled, the server provides 80 logical processors, so that 16 logical processors are idle and almost all of the processor slots are wasted. In this case, the hyper-threading performance boost does not exceed the computational power added to the physical core.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.