Can Someone Explain These Wait Times to Me?

  • So I know what wait times are, the amount of time SQL spends waiting on a resource. What I don't understand is how this equates to end user wait time and how the numbers can be so high.

    Take for example my companies total disk wait stats for 2012: 249,440,577,575ms or 7.9 years! I know there are multiple processes that can wait at the same time but 7.9 years of waiting seems crazy. My average disk read latency for last year was 3.6ms and write latency was 3.8ms so I don't think I have a disk issue.

    Here is another example: in the past day my total disk resource waits are 11,252,662ms or 3.1 hours. Nothing seems to be hanging up and I am not getting any reports of the system being slow. The total CLR waits for the same time period are 30,302,950,440ms. I know Microsoft says you can safely ignore CLR waits but a number that large I have a hard time ignoring.

    Could it be that I am just looking at waits that are okay to ignore and my actual wait time is not that high? Hopefully someone here can help, I'm lost at trying to explain it.

  • What exact counter are you calling "total wait"? If it is wait_time_ms then you should remember that it shows accumulated wait times since the server was restarted, therefore high numbers in this column are nothing extra-ordinary. Try to divide it by waiting_tasks_count and check what is a max_wait_time_ms for the wait_type you are interested in.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • See the picture above. The total wait I am using for disk if at the top under resource waits. I use a program to store all performance and wait statistics. The data in the picture is independent of the last time the server was restarted.

    I will try dividing by waiting_tasks_count and see what I get but I don't think that metric is logged so I will not be able to get a total year value.

  • I cannot see the picture here. (company policy stops downloads)

    If you only collect total wait time, then it's really hard to say anything, as it just accumulates everything.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Waits over a period of a year aren't all that useful, too low a granularity. When doing wait type analysis, you usually look at the difference between the waits a minute or two apart, that gives information on the current problems, which allows investigation into current problems.

    Waits aggregated over months or years are just numbers with minimal meaning.

    Oh, and there are waits that you should just ignore no matter how high the number is, often because said waiting processes are normal and expected and often background tasks.

    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
  • It might be helpful to clear your wait statistics, and start to monitor again. I agree with Gail, in that after a couple of months, it is difficult to analyze.

    DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR);

  • I actually record the wait stats on my main OLTP instance into a special DBA only database and reset them every hour. After about 2 and a half years at my current job the table size is only about 26 Meg, and it gives me very valuable information to understand the times of day that the server is under the heaviest loads, what the bottlenecks are at different times of day, different days of week, gives me a baseline to be able to analyze if waits are getting worse, and gives me insight to plan when good times are to add new processes or do maintenance to the system are.

  • Thanks everyone for the input. I will just focus on the short term waits stats and clear out the rest.

Viewing 8 posts - 1 through 7 (of 7 total)

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