Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 5123

Why do I have CXPackets when running maxdop=1?

$
0
0

I've continued to do some research on our current system.

We're running maxdop=1 on four cores in a VM environment, officially it's OLTP but we run some batch processing too so it's probably a mixed workload.

99% of that workload uses the default maxdop, I'm the only one in the shop who would ever override it, and I've done so only in one or two SPs - though they are some that are frequently used. 

I've now found that in some very short periods down to five seconds, as well as over longer periods of an hour or two, our leading wait can be CXPacket, and especially in the shorter periods the total wait time can be greater than the elapsed time, and the average wait time can approach or even exceed 4ms.

This would appear to be some form of CPU pressure and yet our cumulative CPU counters never seem to jump above about 70%, I haven't tried to watch individual ones - I guess with maxdop=1 if three of them were maxed at 100% that would look like 75% cumulative, wouldn't it?  Hmm.  Off I go to play with perfmon!

The other possibility is that these rather nasty CXPackets come from just the couple of cases where I did force maxdop>1, even though in those cases the maxdop>1 seemed to really help, I guess that still leaves some room.  Or, could it be a sign that the maxdop>1 tasks are blocked/waiting because too many maxdop=1 tasks are already running?

Any further interpretations and advice welcome.

Josh

ps: I asked some of this the other day on another thread:

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/84f36fc8-1d95-4c32-81e0-c39ad419c4eb/lots-of-pagelatchex-waits-also-cxpacket?forum=sqldatabaseengine#3f4bdc36-0245-4fd4-b713-97cb155277a6


Viewing all articles
Browse latest Browse all 5123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>