Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

One SPID - Split into 127? Expand / Collapse
Author
Message
Posted Monday, January 28, 2013 1:44 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, May 22, 2013 4:13 PM
Points: 1,172, Visits: 2,687

My query is paralleled , when i query sys.sysprocesses i see 127 records for that same spid with CXPAcket wait types. There are 24 logical cores on the server, shouldn't i see only 24 records (one for each thread), why do i see 127?
Post #1412636
Posted Monday, January 28, 2013 3:34 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 4:11 PM
Points: 37,741, Visits: 30,020
Each operator in the parallel portion of the query plan can parallel up to maxdop/number of cores. They won't all be running, but they can all exist.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1412683
Posted Monday, January 28, 2013 3:41 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, May 22, 2013 4:13 PM
Points: 1,172, Visits: 2,687
GilaMonster (1/28/2013)
Each operator in the parallel portion of the query plan can parallel up to maxdop/number of cores. They won't all be running, but they can all exist.


I see 127 records ?
Post #1412685
Posted Monday, January 28, 2013 3:53 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 4:11 PM
Points: 37,741, Visits: 30,020
sqldba_newbie (1/28/2013)
GilaMonster (1/28/2013)
Each operator in the parallel portion of the query plan can parallel up to maxdop/number of cores. They won't all be running, but they can all exist.


I see 127 records ?


I explained why you can have so many. If there are multiple operators in the query can parallel, there can be up to maxdop threads for each operator, so 5 operators each paralleling over 24 cores would be 120 threads plus control threads. They won't all be running at the same time, but they can all exist.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1412688
Posted Monday, January 28, 2013 5:14 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, May 22, 2013 4:13 PM
Points: 1,172, Visits: 2,687
GilaMonster (1/28/2013)
sqldba_newbie (1/28/2013)
GilaMonster (1/28/2013)
Each operator in the parallel portion of the query plan can parallel up to maxdop/number of cores. They won't all be running, but they can all exist.


I see 127 records ?


I explained why you can have so many. If there are multiple operators in the query can parallel, there can be up to maxdop threads for each operator, so 5 operators each paralleling over 24 cores would be 120 threads plus control threads. They won't all be running at the same time, but they can all exist.


Thanks. If they are in parallel shouldn't atleast 24 of them be running?
Post #1412709
Posted Tuesday, January 29, 2013 1:26 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 4:11 PM
Points: 37,741, Visits: 30,020
sqldba_newbie (1/28/2013)
Thanks. If they are in parallel shouldn't atleast 24 of them be running?


At most 24 will be running at any one time (that's how many cores you have).



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1412801
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse