<?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/"
		>
<channel>
	<title>Comments on: CXPACKET? What&#8217;s That? And What&#8217;s Next?</title>
	<atom:link href="http://michaeljswart.com/2011/12/cxpacket-whats-that-and-whats-next/feed/" rel="self" type="application/rss+xml" />
	<link>http://michaeljswart.com/2011/12/cxpacket-whats-that-and-whats-next/</link>
	<description>Database Whisperer</description>
	<lastBuildDate>Wed, 19 Jun 2013 04:32:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Tahir</title>
		<link>http://michaeljswart.com/2011/12/cxpacket-whats-that-and-whats-next/comment-page-1/#comment-6310</link>
		<dc:creator>Tahir</dc:creator>
		<pubDate>Sun, 11 Dec 2011 05:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://michaeljswart.com/?p=2329#comment-6310</guid>
		<description><![CDATA[Excellent post.]]></description>
		<content:encoded><![CDATA[<p>Excellent post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael J Swart</title>
		<link>http://michaeljswart.com/2011/12/cxpacket-whats-that-and-whats-next/comment-page-1/#comment-6306</link>
		<dc:creator>Michael J Swart</dc:creator>
		<pubDate>Fri, 09 Dec 2011 13:12:32 +0000</pubDate>
		<guid isPermaLink="false">http://michaeljswart.com/?p=2329#comment-6306</guid>
		<description><![CDATA[High Neil, the query stats are for the statement and the query plan is for the batch. So it&#039;s important to look at the query text to help pinpoint the query in the plan with parallelism.

&quot;high cpu queries using parallelism&quot; is strongly strongly related to &quot;queries that cause CXPACKET&quot;. So if troubleshooting CPU is a concern, I would use the top 20 query without a filter. But for digging into CXPACKET waits, I&#039;ve found the filter works well. 

I think these comments jive with your comments. What do you think?]]></description>
		<content:encoded><![CDATA[<p>High Neil, the query stats are for the statement and the query plan is for the batch. So it&#8217;s important to look at the query text to help pinpoint the query in the plan with parallelism.</p>
<p>&#8220;high cpu queries using parallelism&#8221; is strongly strongly related to &#8220;queries that cause CXPACKET&#8221;. So if troubleshooting CPU is a concern, I would use the top 20 query without a filter. But for digging into CXPACKET waits, I&#8217;ve found the filter works well. </p>
<p>I think these comments jive with your comments. What do you think?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Hambly</title>
		<link>http://michaeljswart.com/2011/12/cxpacket-whats-that-and-whats-next/comment-page-1/#comment-6305</link>
		<dc:creator>Neil Hambly</dc:creator>
		<pubDate>Fri, 09 Dec 2011 12:17:29 +0000</pubDate>
		<guid isPermaLink="false">http://michaeljswart.com/?p=2329#comment-6305</guid>
		<description><![CDATA[This is a good start.. One thing to note is that although you are identify plans that have parallelism in their QP, these may contain multiple statements of which only some have the parallelism operators and of those it may account for a small percentage of the overall CPU of the batch
Actual Example: a Stored procedure with 2 statements in the plan, 1 of these with 99.9% of the CPU and the other 0.1%, it is only the 0.1% (CPU) statement that has parallelism operators (this was a Clustered index table scan as it was retrieving 70% of the tables rows) so in this case was the required result

As your [Query Text] shows the statement that uses the parallelism operators... in this example that was the 0.1% CPU of the total batch
So we need to wary that this could maybe *not always&quot; be the reason for the HIGH CPU usage - you will need to look further

Of course this is just 1 example and many will be the majority of the CPU and causing performance issues for a variety of reasons (thread skew, blocking or other wait conditions etc..)]]></description>
		<content:encoded><![CDATA[<p>This is a good start.. One thing to note is that although you are identify plans that have parallelism in their QP, these may contain multiple statements of which only some have the parallelism operators and of those it may account for a small percentage of the overall CPU of the batch<br />
Actual Example: a Stored procedure with 2 statements in the plan, 1 of these with 99.9% of the CPU and the other 0.1%, it is only the 0.1% (CPU) statement that has parallelism operators (this was a Clustered index table scan as it was retrieving 70% of the tables rows) so in this case was the required result</p>
<p>As your [Query Text] shows the statement that uses the parallelism operators&#8230; in this example that was the 0.1% CPU of the total batch<br />
So we need to wary that this could maybe *not always&#8221; be the reason for the HIGH CPU usage &#8211; you will need to look further</p>
<p>Of course this is just 1 example and many will be the majority of the CPU and causing performance issues for a variety of reasons (thread skew, blocking or other wait conditions etc..)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael J. Swart</title>
		<link>http://michaeljswart.com/2011/12/cxpacket-whats-that-and-whats-next/comment-page-1/#comment-6304</link>
		<dc:creator>Michael J. Swart</dc:creator>
		<pubDate>Fri, 09 Dec 2011 11:39:56 +0000</pubDate>
		<guid isPermaLink="false">http://michaeljswart.com/?p=2329#comment-6304</guid>
		<description><![CDATA[@Fatherjack, Yes, I can confirm that. I struggled with that, trying to find the best way to mitigate that scenario and I think your change works well. I&#039;ve updated the post. Thanks!

@Merrill, @John, John&#039;s right. CXPACKET isn&#039;t bad in itself just like blocking isn&#039;t bad in itself. It&#039;s excessive blocking and excessive CXPACKET that&#039;s the problem. In my head, the audience for this article is someone who is managing an OLTP database and who sees a lot of parallelism. This means some query is doing a lot of work. That&#039;s not bad in itself. Sometimes queries need to do a lot of work. The question that should be asked is whether this query is doing &lt;em&gt;too&lt;/em&gt; much work. Before you can answer that, you need to know which queries those are. My hope is that this post helps with that.]]></description>
		<content:encoded><![CDATA[<p>@Fatherjack, Yes, I can confirm that. I struggled with that, trying to find the best way to mitigate that scenario and I think your change works well. I&#8217;ve updated the post. Thanks!</p>
<p>@Merrill, @John, John&#8217;s right. CXPACKET isn&#8217;t bad in itself just like blocking isn&#8217;t bad in itself. It&#8217;s excessive blocking and excessive CXPACKET that&#8217;s the problem. In my head, the audience for this article is someone who is managing an OLTP database and who sees a lot of parallelism. This means some query is doing a lot of work. That&#8217;s not bad in itself. Sometimes queries need to do a lot of work. The question that should be asked is whether this query is doing <em>too</em> much work. Before you can answer that, you need to know which queries those are. My hope is that this post helps with that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fatherjack</title>
		<link>http://michaeljswart.com/2011/12/cxpacket-whats-that-and-whats-next/comment-page-1/#comment-6303</link>
		<dc:creator>Fatherjack</dc:creator>
		<pubDate>Fri, 09 Dec 2011 11:26:39 +0000</pubDate>
		<guid isPermaLink="false">http://michaeljswart.com/?p=2329#comment-6303</guid>
		<description><![CDATA[Michael, I am getting a number of false positives with your code (ie queries where there isnt parallelism in the plan). It seems to be most often when the execution count is high so I would guess that its down to a rounding effect somewhere in the work. 

If you take the difference between the Total CPU and the Total Elapsed Time and divide that by the number of executions and you get 0 then these plans dont have any parallelism operators. Adding &quot;( ( total_worker_time - total_elapsed_time ) / execution_count ) * 1.0 &gt; 1000&quot; to your WHERE clause gives me results with no false positives.

Can you confirm any details in this scenario please?]]></description>
		<content:encoded><![CDATA[<p>Michael, I am getting a number of false positives with your code (ie queries where there isnt parallelism in the plan). It seems to be most often when the execution count is high so I would guess that its down to a rounding effect somewhere in the work. </p>
<p>If you take the difference between the Total CPU and the Total Elapsed Time and divide that by the number of executions and you get 0 then these plans dont have any parallelism operators. Adding &#8220;( ( total_worker_time &#8211; total_elapsed_time ) / execution_count ) * 1.0 &gt; 1000&#8243; to your WHERE clause gives me results with no false positives.</p>
<p>Can you confirm any details in this scenario please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Something for the Weekend &#8211; SQL Server Links 09/12/11</title>
		<link>http://michaeljswart.com/2011/12/cxpacket-whats-that-and-whats-next/comment-page-1/#comment-6302</link>
		<dc:creator>Something for the Weekend &#8211; SQL Server Links 09/12/11</dc:creator>
		<pubDate>Fri, 09 Dec 2011 11:08:37 +0000</pubDate>
		<guid isPermaLink="false">http://michaeljswart.com/?p=2329#comment-6302</guid>
		<description><![CDATA[[...] CXPACKET? What’s That? And What’s Next? - Cooking up some CXPACKET Waits can be a recipe for disaster. Performance tuning head chef Michael J. Swart (Blog&#124;Twitter) walks us through. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] CXPACKET? What’s That? And What’s Next? - Cooking up some CXPACKET Waits can be a recipe for disaster. Performance tuning head chef Michael J. Swart (Blog|Twitter) walks us through. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Sansom</title>
		<link>http://michaeljswart.com/2011/12/cxpacket-whats-that-and-whats-next/comment-page-1/#comment-6301</link>
		<dc:creator>John Sansom</dc:creator>
		<pubDate>Fri, 09 Dec 2011 09:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://michaeljswart.com/?p=2329#comment-6301</guid>
		<description><![CDATA[Fantastic, another great post Michael. I particularly enjoyed the novel use of the good ole &quot;Too may cooks...&quot; analogy.

Merrill, in the post Michael eludes that it&#039;s more geared toward analysing the occurrence of parallel queries for OLTP workloads. 

Far be it from me to put words into the man&#039;s mouth but my own understanding is that in such scenarios it is particularly undesirable to see a parallel plan being produced given that the goal is for short lived/fast transactions which are often performing relatively small data reads/writes. Seeing a parallel query plan produced for OLTP workloads is often an indicator of a poor plan choice/issue, such as a poorly written query or missing indexes.]]></description>
		<content:encoded><![CDATA[<p>Fantastic, another great post Michael. I particularly enjoyed the novel use of the good ole &#8220;Too may cooks&#8230;&#8221; analogy.</p>
<p>Merrill, in the post Michael eludes that it&#8217;s more geared toward analysing the occurrence of parallel queries for OLTP workloads. </p>
<p>Far be it from me to put words into the man&#8217;s mouth but my own understanding is that in such scenarios it is particularly undesirable to see a parallel plan being produced given that the goal is for short lived/fast transactions which are often performing relatively small data reads/writes. Seeing a parallel query plan produced for OLTP workloads is often an indicator of a poor plan choice/issue, such as a poorly written query or missing indexes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Merrill Aldrich</title>
		<link>http://michaeljswart.com/2011/12/cxpacket-whats-that-and-whats-next/comment-page-1/#comment-6300</link>
		<dc:creator>Merrill Aldrich</dc:creator>
		<pubDate>Fri, 09 Dec 2011 06:07:49 +0000</pubDate>
		<guid isPermaLink="false">http://michaeljswart.com/?p=2329#comment-6300</guid>
		<description><![CDATA[Interesting - but I have a question: you seem automatically to equate parallel with &quot;bad.&quot; Parallel does not automatically imply badness. How do you separate the good parallel queries from the ones where the parallel processing actually does harm and a single threaded plan would be better?]]></description>
		<content:encoded><![CDATA[<p>Interesting &#8211; but I have a question: you seem automatically to equate parallel with &#8220;bad.&#8221; Parallel does not automatically imply badness. How do you separate the good parallel queries from the ones where the parallel processing actually does harm and a single threaded plan would be better?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching using disk: basic
Object Caching 282/284 objects using disk: basic

 Served from: michaeljswart.com @ 2013-06-19 17:03:45 by W3 Total Cache -->