SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


high CXPACKET and LATCH_EX


high CXPACKET and LATCH_EX

Author
Message
Grace09
Grace09
Old Hand
Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)

Group: General Forum Members
Points: 344 Visits: 1710
Users claims the slow performance on the database. I collected top waits for the server as below. How can I find out what queries that have high CXPACKET and LATCH_EX? Thanks.

wait_type wait_time_s pct running_pct
CXPACKET 83931185.29 64.92 64.92
LATCH_EX 18154049.19 14.04 78.97
BROKER_RECEIVE_WAITFOR 6752891.58 5.22 84.19
BROKER_EVENTHANDLER 6749025.91 5.22 89.41
CMEMTHREAD 4391072.63 3.40 92.81
ASYNC_NETWORK_IO 1701190.66 1.32 94.12
PAGEIOLATCH_SH 1467659.30 1.14 95.26
SOS_SCHEDULER_YIELD 1145887.64 0.89 96.15
CXROWSET_SYNC 967398.98 0.75 96.89
TRACEWRITE 946843.31 0.73 97.63
WRITELOG 765721.93 0.59 98.22
PAGELATCH_UP 515339.54 0.40 98.62
LCK_M_S 239391.56 0.19 98.80
ASYNC_IO_COMPLETION 196326.98 0.15 98.95
LATCH_SH 167410.82 0.13 99.08
GilaMonster
GilaMonster
SSC Guru
SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)SSC Guru (223K reputation)

Group: General Forum Members
Points: 223795 Visits: 46302
And?

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
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


Tac11
Tac11
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1509 Visits: 1159
Hi Mr. Gila,
I have same first 3 issues. Can you please give suggestions?
Jack Corbett
  Jack Corbett
SSC-Forever
SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)

Group: General Forum Members
Points: 44507 Visits: 14925
Jonathan Kehayias has a query on this blog post that identifies parallel plans in the cache which can help you start tuning the SQL that might be causing the CXPACKET waits.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Lempster
Lempster
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5087 Visits: 1657
smtzac (5/12/2014)
Hi Mr. Gila,
I have same first 3 issues. Can you please give suggestions?

I just spent a long time replying to this and then an error occurred when I submitted my post! Angry

I started off by saying that it's Mrs (or Ms) Gila - or Shaw to be correct. I then wrote a bit about CXPACKET waits, but I've since come across this from Paul Randall:
CXPACKET: this wait type always accrues when parallelism happens, as the control thread in a parallel operation waits until all threads have completed. However, when parallel threads are given unbalanced amounts of work to do, the threads that finish early also accrue this wait type, leading to it maybe becoming the most prevalent. So this one could be benign, as the workload has lots of good parallelism, but could be malignant if there’s unwanted parallelism or problems causing skewed distribution of work among parallel threads.


You can affect parallelism through the use of Max Degreee of Parallelism (MAXDOP) and Cost Threshold for Parallelism, BUT, I would strongly advise against changing those settings on a Production server with testing in a Test environment first.

Regards
Lempster
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search