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

high CXPACKET and LATCH_EX Expand / Collapse
Author
Message
Posted Friday, April 25, 2014 1:12 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Yesterday @ 10:13 AM
Points: 54, Visits: 1,247
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
Post #1565230
Posted Friday, April 25, 2014 1:26 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:58 PM
Points: 42,466, Visits: 35,532
And?


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 #1565233
Posted Monday, May 12, 2014 5:42 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 4:39 AM
Points: 86, Visits: 298
Hi Mr. Gila,
I have same first 3 issues. Can you please give suggestions?
Post #1569785
Posted Monday, May 12, 2014 10:36 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Thursday, July 24, 2014 9:07 AM
Points: 11,157, Visits: 12,899
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

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
Post #1569970
Posted Tuesday, May 13, 2014 4:04 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 2:05 AM
Points: 2,036, Visits: 1,378
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!

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
Post #1570204
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse