high CXPACKET and LATCH_EX

  • 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

  • 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
  • Hi Mr. Gila,

    I have same first 3 issues. Can you please give suggestions?

  • Jonathan Kehayias has a query on this blog post[/url] that identifies parallel plans in the cache which can help you start tuning the SQL that might be causing the CXPACKET waits.

    Jack Corbett
    Consultant - Straight Path Solutions
    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

  • 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

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply