Is SQL Server Hyper-threading?

Source: Internet
Author: User

Using the Sys.dm_sys_info view is often confusing to the Hyperthread_ratio column. What is the meaning of this column?

Translation of an article of the foreign Great God, http://sqlblog.com/blogs/kalen_delaney/archive/2007/12/08/hyperthreaded-or-not.aspx

In my class or every time I do a performance consultant, I often get the question "How do I know if our SQL Server is Hyper-threading"?

When I found out that Dmv--sys.dm_sys_info had a column called Hyperthread_ratio (Super line turndown), I felt very happy. Soon after, I read one of my favorite SQL SERVER

Blogger Buck Woody a blog post. He points out that the following query tells us the number of CPU cores, rather than telling you whether Hyper-threading is turned on.

SELECT Cpu_count/hyperthread_ratio as sockets
From Sys.dm_os_sys_info

Although Buck says this statement tells us the number of cores, it's not true. Because a slot can contain a multi-core CPU. A cpu_count with a single-socket dual-core CPU and no Hyper-threading is 2,hyperthread_ratio is 2, while single-socket single-core and hyper-threaded computer hyperthread_ratio are also 2. In 2 cases, the Cpu_count/hyperthread_ratio is the number of slots. If we have a single slot, a dual-core CPU, and a hyper-threaded computer, Cpu_count will turn into 4.hyperthread_ratio is also 4, using this ratio is also 1, summarized as follows:

Number of Sockets

Number of cores

Hyperthreaded?

Sys.dm_os_info.
Cpu_count

Sys.dm_os_info.
Hyperthread_ratio

Cpu_count/hyperthread_ratio

1

2

NO

2

2

1

1

1

YES

2

2

1

1

2

YES

4

4

1

So even though Buck says that this formula can tell us the number of cores, the query itself tells us that the result is "number of slots." Cpu_count/hyperthread_ratio will get the number of slots, not the number of cores. And there is no way to differentiate between dual-core and Hyper-Threading.

Is SQL Server Hyper-threading?

Related Article

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.