What is the explanation for this apparent contradiction?

The Help says "hyperthreaded processors are not counted for intra-query parallelism" but I regularly see 8 INT:Exchange connections (and 8 subtrees in the plans) when intra-query parallelism is in full swing on a chips like the Intel i7-4790 which have 4 hyperthreaded cores.

Help: Parallelism in Queries


"However, hyperthreaded processors are not counted for intra-query parallelism so you must divide the value of NumLogicalProcessorsUsed by two if the computer is hyperthreaded."

Intel® Core™ i7-4790 Processor


# of Cores                         4
# of Threads                       8
Intel® Hyper-Threading Technology  Yes
SELECT PROPERTY ( 'NumLogicalProcessorsUsed' );

asked 21 Jan, 06:10

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%

Hm, the full quote says:

Following is a list of circumstances in which a query cannot take advantage of parallelism, either at optimization or execution time:
[...] the server computer is not licensed to use multiple processors. You can check this by looking at the NumLogicalProcessorsUsed server property. However, hyperthreaded processors are not counted for intra-query parallelism so you must divide the value of NumLogicalProcessorsUsed by two if the computer is hyperthreaded.

So the "not counting" may also refer to the counting the number of licensed processors... What does happen when you set max_query_tasks to 4?

Probably also a question of comparing the server porperties LicenseType, NumLogicalProcessors(Used) and NumPhysicalProcessors(Used). I surely don't claim to fully understand those numbers.

(21 Jan, 07:07) Volker Barth
Replies hidden

Here is another quote from later on the same page, and it doesn't seem to have anything to do with licensing;

"the value of ActiveReq has been greater than, or equal to, the value of NumLogicalProcessorsUsed at any time in the recent past (divide the number of processors by two if the computer is hyperthreaded)"

(21 Jan, 08:31) Breck Carter

I forgot the Licensing Rule Of Thumb which states "All discussions involving licensing are impossible to understand and should therefore be disregarded" :)

(21 Jan, 08:35) Breck Carter

So what does sa_cpu_topology() reveal - thread values > 0 in your case?

(21 Jan, 11:41) Volker Barth
     os_id     socket       core     thread       apic      group  numa_node online in_use user_selected 
---------- ---------- ---------- ---------- ---------- ---------- ---------- ------ ------ ------------- 
         0          0          0          0          0          0          0      1      1             1 
         1          0          0          1          1          0          0      1      1             1 
         2          0          1          0          2          0          0      1      1             1 
         3          0          1          1          3          0          0      1      1             1 
         4          0          2          0          4          0          0      1      1             1 
         5          0          2          1          5          0          0      1      1             1 
         6          0          3          0          6          0          0      1      1             1 
         7          0          3          1          7          0          0      1      1             1 
(21 Jan, 15:37) Breck Carter

We both obviously agree that the doc's statemements on licensing and processors are difficult to understand... That being said, I guess the "not counting" really relates to the fact that a hyperthreading core is counted as one core w.r.t. licensing, see the following quote from the "per seat" license type:

If a core contains multiple threads, all threads of that core might be used.

Your sample machine has 4 cores and is licensed to use all 8 hyperthreads on those cores, so it is also allowed to use all 8 hyperthreads for 8 parallel operators. Since only four cores are officially licensed, you can still use 8 threads, so in my understanding, the phrase should be understood as "the (additional) hyperthreads are not counted".

From a practical point of view: As your machine does use 8 logical processors according to the server properties, why should it not use all of those for parallel tasks (unless you want to limit the max_query_tasks option)...

permanent link

answered 22 Jan, 03:13

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

edited 22 Jan, 04:56

Comment Text Removed
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 21 Jan, 06:10

question was seen: 146 times

last updated: 22 Jan, 11:33