<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; CXPACKET &#8211; Parallelism &#8211; Usual Solution &#8211; Wait Type &#8211; Day 6 of 28</title>
	<atom:link href="http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Sat, 25 May 2013 01:31:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #015 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-419693</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #015 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 09 Feb 2013 01:31:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-419693</guid>
		<description><![CDATA[[...] CXPACKET – Parallelism – Usual Solution – Wait Type – Day 6 of 28 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] CXPACKET – Parallelism – Usual Solution – Wait Type – Day 6 of 28 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: firasatahmed</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-414255</link>
		<dc:creator><![CDATA[firasatahmed]]></dc:creator>
		<pubDate>Mon, 28 Jan 2013 20:35:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-414255</guid>
		<description><![CDATA[Hello Jonathan,

     Could you please tell me what is recommended CTP and MAXDOP value on my sql 2008 X64 standard edition. Mentioned below is the o/p sys.dm_os_nodes


0	ONLINE	0x000000000BD50080	0x0000000000FC4248	0x000000000E89C1A0	1	16773120	12	11	42	5	3665920	12873728	1
1	ONLINE	0x0000000000FC6080	0x0000000000FC4578	0x0000000022BD21A0	0	4095	12	11	42	5	0	0	1
64	ONLINE DAC	0x0000000023A30080	0x0000000000FC48A8	0x0000000023A3E1A0	0	0	1	1	1	1	0	0	0]]></description>
		<content:encoded><![CDATA[<p>Hello Jonathan,</p>
<p>     Could you please tell me what is recommended CTP and MAXDOP value on my sql 2008 X64 standard edition. Mentioned below is the o/p sys.dm_os_nodes</p>
<p>0	ONLINE	0x000000000BD50080	0x0000000000FC4248	0x000000000E89C1A0	1	16773120	12	11	42	5	3665920	12873728	1<br />
1	ONLINE	0x0000000000FC6080	0x0000000000FC4578	0x0000000022BD21A0	0	4095	12	11	42	5	0	0	1<br />
64	ONLINE DAC	0x0000000023A30080	0x0000000000FC48A8	0x0000000023A3E1A0	0	0	1	1	1	1	0	0	0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevswag</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-339286</link>
		<dc:creator><![CDATA[kevswag]]></dc:creator>
		<pubDate>Thu, 30 Aug 2012 14:37:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-339286</guid>
		<description><![CDATA[How do i find the queries that are executing using parallelism. I have SQL server 2005 installed but the prod database is set at compatibility level 80. I am see the follow wait stats using Glen Barry&#039;s wait SQL 
                                wait_time_s               pct          running_pct
CXPACKET	1280289.05	51.45	51.45

 Like Jonathan has stated. Our OLTP system supports reporting, could the queries by found by using profiler and looking for queries where duration is greater than CPU?  Our Maxdop is currently set at 0.]]></description>
		<content:encoded><![CDATA[<p>How do i find the queries that are executing using parallelism. I have SQL server 2005 installed but the prod database is set at compatibility level 80. I am see the follow wait stats using Glen Barry&#8217;s wait SQL<br />
                                wait_time_s               pct          running_pct<br />
CXPACKET	1280289.05	51.45	51.45</p>
<p> Like Jonathan has stated. Our OLTP system supports reporting, could the queries by found by using profiler and looking for queries where duration is greater than CPU?  Our Maxdop is currently set at 0.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevswag</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-339284</link>
		<dc:creator><![CDATA[kevswag]]></dc:creator>
		<pubDate>Thu, 30 Aug 2012 14:26:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-339284</guid>
		<description><![CDATA[How do you find the queries that are executing using parallelism ? I have SQL server 2005 installed but the prod database is set at compatibility 80.]]></description>
		<content:encoded><![CDATA[<p>How do you find the queries that are executing using parallelism ? I have SQL server 2005 installed but the prod database is set at compatibility 80.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duane Lawrence</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-277316</link>
		<dc:creator><![CDATA[Duane Lawrence]]></dc:creator>
		<pubDate>Wed, 18 Apr 2012 16:44:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-277316</guid>
		<description><![CDATA[I have a cut over in 3 days and performance testing is under way now.  I found that adjusting
EXEC sys.sp_configure N&#039;cost threshold for parallelism&#039;, N&#039;25&#039;
but leaving MaxDOP set to 0 to have the best performance.   At least now I have stopped seeing CXPACKET wait types and the performance difference is marginally better.

Duane Lawrence]]></description>
		<content:encoded><![CDATA[<p>I have a cut over in 3 days and performance testing is under way now.  I found that adjusting<br />
EXEC sys.sp_configure N&#8217;cost threshold for parallelism&#8217;, N&#8217;25&#8242;<br />
but leaving MaxDOP set to 0 to have the best performance.   At least now I have stopped seeing CXPACKET wait types and the performance difference is marginally better.</p>
<p>Duane Lawrence</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; CXPACKET &#8211; Parallelism &#8211; Advanced Solution &#8211; Wait Type &#8211; Day 7 of 28 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-252540</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; CXPACKET &#8211; Parallelism &#8211; Advanced Solution &#8211; Wait Type &#8211; Day 7 of 28 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Tue, 14 Feb 2012 18:41:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-252540</guid>
		<description><![CDATA[[...] we discussed about the what is the common solution to solve the issue with CXPACKET wait time. Today I am going to talk about few of the other suggestions which can help to reduce the [...]]]></description>
		<content:encoded><![CDATA[<p>[...] we discussed about the what is the common solution to solve the issue with CXPACKET wait time. Today I am going to talk about few of the other suggestions which can help to reduce the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Maheu</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-188363</link>
		<dc:creator><![CDATA[Joe Maheu]]></dc:creator>
		<pubDate>Fri, 04 Nov 2011 15:16:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-188363</guid>
		<description><![CDATA[When you wrote this command:

EXEC sys.sp_configure N&#039;cost threshold for parallelism&#039;, N&#039;1&#039;
GO
RECONFIGURE WITH OVERRIDE
GO


Did you not mean to reference &#039;max degree of parallelism&#039;?]]></description>
		<content:encoded><![CDATA[<p>When you wrote this command:</p>
<p>EXEC sys.sp_configure N&#8217;cost threshold for parallelism&#8217;, N&#8217;1&#8242;<br />
GO<br />
RECONFIGURE WITH OVERRIDE<br />
GO</p>
<p>Did you not mean to reference &#8216;max degree of parallelism&#8217;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xunren</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-161169</link>
		<dc:creator><![CDATA[Xunren]]></dc:creator>
		<pubDate>Wed, 24 Aug 2011 00:29:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-161169</guid>
		<description><![CDATA[Is this N&#039;max degree of parallelism&#039; means number of physical CPUs or logical processors ?  We have a db box with 2 CPUs x 4 Cores,  so,  shows 8 logical processors on Task Manager,  so,  should I set the limit to 1 (half of physical CPUs )  or 4 ( half of 8 logical )  ?  Thanks.]]></description>
		<content:encoded><![CDATA[<p>Is this N&#8217;max degree of parallelism&#8217; means number of physical CPUs or logical processors ?  We have a db box with 2 CPUs x 4 Cores,  so,  shows 8 logical processors on Task Manager,  so,  should I set the limit to 1 (half of physical CPUs )  or 4 ( half of 8 logical )  ?  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Arjentinski</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-118351</link>
		<dc:creator><![CDATA[Ivan Arjentinski]]></dc:creator>
		<pubDate>Sun, 13 Feb 2011 13:05:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-118351</guid>
		<description><![CDATA[Pinal, 

I think there is a mistake in your post. For pure OLTP and OLAP systems you are giving (correctly) advice for MaxDOP, but the code states (incorrectly) :
EXEC sys.sp_configure N&#039;cost threshold for parallelism&#039;, N&#039;1&#039;

Also, I want to express some concern about the hard advice for the MAXDOP=2. Maybe Jonathans advice might give better initial value.]]></description>
		<content:encoded><![CDATA[<p>Pinal, </p>
<p>I think there is a mistake in your post. For pure OLTP and OLAP systems you are giving (correctly) advice for MaxDOP, but the code states (incorrectly) :<br />
EXEC sys.sp_configure N&#8217;cost threshold for parallelism&#8217;, N&#8217;1&#8242;</p>
<p>Also, I want to express some concern about the hard advice for the MAXDOP=2. Maybe Jonathans advice might give better initial value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nilesh Shinde</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-117051</link>
		<dc:creator><![CDATA[Nilesh Shinde]]></dc:creator>
		<pubDate>Mon, 07 Feb 2011 14:33:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-117051</guid>
		<description><![CDATA[Hi Pinal,

Very good article to understand the role of Wait Types in perfomance ......Just wanted to correct it here that in your blog you have mentioned to change &#039;Max Degree Of Paralleism&#039; to 1 or 0 as per the system (OLAP/OLTP)&#039; but in your query you have used &#039;cost threshold for parallelism&#039; parameter. please correct it to avoid any confusion.

Thanks,
Nilesh]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Very good article to understand the role of Wait Types in perfomance &#8230;&#8230;Just wanted to correct it here that in your blog you have mentioned to change &#8216;Max Degree Of Paralleism&#8217; to 1 or 0 as per the system (OLAP/OLTP)&#8217; but in your query you have used &#8216;cost threshold for parallelism&#8217; parameter. please correct it to avoid any confusion.</p>
<p>Thanks,<br />
Nilesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Kehayias</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-116959</link>
		<dc:creator><![CDATA[Jonathan Kehayias]]></dc:creator>
		<pubDate>Mon, 07 Feb 2011 02:14:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-116959</guid>
		<description><![CDATA[Marko,

In general, OLTP systems don&#039;t benefit from parallelism, but peoples definition of what an OLTP system is differs.  A lot of OLTP systems these days are not strictly used for OLTP workloads, but also support reporting as well.  It is possible that the problem could be parallelism in that scenario, and it is possible and more likely that a detailed analysis of the reporting side would show that code changes, index changes, or overall implementation changes would solve the problems.  

As I mentioned in my first comment, I look at the queries that are executing using parallelism and determine why.  Is there a missing index, are the estimates made by the optimizer significantly different from the actual results in the execution plan?  How frequently are the queries being executed?  It could be that  changing the &#039;cost threshold for parallelism&#039; option to a higher value would reduce the number of queries running under parallelism, but still allow more expensive queries to utilize parallelism.  The hardware being used is also a factor in what you do.  

This is really a huge &quot;It Depends&quot; type of subject, and a lot of things come into play that have to be looked at to determine what is best.  If you&#039;d like some assistance with looking at the problem feel free to contact me.]]></description>
		<content:encoded><![CDATA[<p>Marko,</p>
<p>In general, OLTP systems don&#8217;t benefit from parallelism, but peoples definition of what an OLTP system is differs.  A lot of OLTP systems these days are not strictly used for OLTP workloads, but also support reporting as well.  It is possible that the problem could be parallelism in that scenario, and it is possible and more likely that a detailed analysis of the reporting side would show that code changes, index changes, or overall implementation changes would solve the problems.  </p>
<p>As I mentioned in my first comment, I look at the queries that are executing using parallelism and determine why.  Is there a missing index, are the estimates made by the optimizer significantly different from the actual results in the execution plan?  How frequently are the queries being executed?  It could be that  changing the &#8216;cost threshold for parallelism&#8217; option to a higher value would reduce the number of queries running under parallelism, but still allow more expensive queries to utilize parallelism.  The hardware being used is also a factor in what you do.  </p>
<p>This is really a huge &#8220;It Depends&#8221; type of subject, and a lot of things come into play that have to be looked at to determine what is best.  If you&#8217;d like some assistance with looking at the problem feel free to contact me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: weicco</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-116883</link>
		<dc:creator><![CDATA[weicco]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 19:14:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-116883</guid>
		<description><![CDATA[Pinal, Jonathan, anyone. 

Is there any rule of thumb like in what kind of situations this is bad for the performance? I&#039;d guess that servers where there is many INSERT/UPDATEs with simultanous SELECTs with lot of CXPACKET waits is not a good thing.

I&#039;m asking because one of our system shows many, many rows with lastwaittype=CXPACKET when I query the sys.sysprocesses view almost any given time. The application that uses the database is sluggish and I&#039;m 99% sure that it&#039;s because of the database or to be precise because of the queries ran against the database.

Thanks in advance,
Marko]]></description>
		<content:encoded><![CDATA[<p>Pinal, Jonathan, anyone. </p>
<p>Is there any rule of thumb like in what kind of situations this is bad for the performance? I&#8217;d guess that servers where there is many INSERT/UPDATEs with simultanous SELECTs with lot of CXPACKET waits is not a good thing.</p>
<p>I&#8217;m asking because one of our system shows many, many rows with lastwaittype=CXPACKET when I query the sys.sysprocesses view almost any given time. The application that uses the database is sluggish and I&#8217;m 99% sure that it&#8217;s because of the database or to be precise because of the queries ran against the database.</p>
<p>Thanks in advance,<br />
Marko</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-116281</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 03:29:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-116281</guid>
		<description><![CDATA[Hi Jonathan,

Your comment is excellent I am updating blog post to suggest people read your comment. 

Many thanks,]]></description>
		<content:encoded><![CDATA[<p>Hi Jonathan,</p>
<p>Your comment is excellent I am updating blog post to suggest people read your comment. </p>
<p>Many thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Kehayias</title>
		<link>http://blog.sqlauthority.com/2011/02/06/sql-server-cxpacket-parallelism-usual-solution-wait-type-day-6-of-28/#comment-116276</link>
		<dc:creator><![CDATA[Jonathan Kehayias]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 02:41:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11489#comment-116276</guid>
		<description><![CDATA[Pinal,

CXPACKET waits aren&#039;t necessarily bad, or even a sign of a problem, they are normal and expected if queries are executing using parallelism.  I wouldn&#039;t recommend that CXPACKET alone ever be considered a reason to reduce or change the configuration of the &#039;max degree of parallelism&#039; configuration option.  Most newer servers are going to be NUMA based systems, and the best practice recommendation for this configuration option is to set it to the number of processor cores in a single NUMA node.  Generally speaking this best practice is not followed, and most recommendations show changing the &#039;max degree of parallelism&#039; configuration option to 1 or 2 whenever the topic of CXPACKET comes up.  

My recommendation, especially on newer NUMA based systems is always to first set it following best practices to the number of physical cores in a single NUMA node and then monitor.  You can find the number of schedulers in each NUMA node by querying the online_scheduler_count from sys.dm_os_nodes.  Even for data warehouse environments, this should be set initially following this practice unless testing has shown that leaving it at 0 is actually best, which is possible.

After making the change monitor not just wait types, but also for how the system is performing.  Look for queries that run under parallelism and test them manually using different levels of DOP using the OPTION(MAXDOP n) query hint to see if reducing parallelism actually improves or harms performance.  You might find that reducing it for one query improves performance while the rest of the workload shows a performance decrease from that same tested reduction.  In that case putting the query hint in, either as a plan guide for the individual query, or by changing the code if you have access, would yield better returns.]]></description>
		<content:encoded><![CDATA[<p>Pinal,</p>
<p>CXPACKET waits aren&#8217;t necessarily bad, or even a sign of a problem, they are normal and expected if queries are executing using parallelism.  I wouldn&#8217;t recommend that CXPACKET alone ever be considered a reason to reduce or change the configuration of the &#8216;max degree of parallelism&#8217; configuration option.  Most newer servers are going to be NUMA based systems, and the best practice recommendation for this configuration option is to set it to the number of processor cores in a single NUMA node.  Generally speaking this best practice is not followed, and most recommendations show changing the &#8216;max degree of parallelism&#8217; configuration option to 1 or 2 whenever the topic of CXPACKET comes up.  </p>
<p>My recommendation, especially on newer NUMA based systems is always to first set it following best practices to the number of physical cores in a single NUMA node and then monitor.  You can find the number of schedulers in each NUMA node by querying the online_scheduler_count from sys.dm_os_nodes.  Even for data warehouse environments, this should be set initially following this practice unless testing has shown that leaving it at 0 is actually best, which is possible.</p>
<p>After making the change monitor not just wait types, but also for how the system is performing.  Look for queries that run under parallelism and test them manually using different levels of DOP using the OPTION(MAXDOP n) query hint to see if reducing parallelism actually improves or harms performance.  You might find that reducing it for one query improves performance while the rest of the workload shows a performance decrease from that same tested reduction.  In that case putting the query hint in, either as a plan guide for the individual query, or by changing the code if you have access, would yield better returns.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
