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


Can Someone Explain These Wait Times to Me?


Can Someone Explain These Wait Times to Me?

Author
Message
tfendt
tfendt
SSC-Enthusiastic
SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)

Group: General Forum Members
Points: 109 Visits: 342
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.


Eugene Elutin
Eugene Elutin
SSCarpal Tunnel
SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)

Group: General Forum Members
Points: 4964 Visits: 5478
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
tfendt
tfendt
SSC-Enthusiastic
SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)

Group: General Forum Members
Points: 109 Visits: 342
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.
Eugene Elutin
Eugene Elutin
SSCarpal Tunnel
SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)

Group: General Forum Members
Points: 4964 Visits: 5478
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
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86737 Visits: 45254
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


Noetic DBA
Noetic DBA
SSC-Addicted
SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)

Group: General Forum Members
Points: 451 Visits: 420
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);
Chris Harshman
Chris Harshman
SSCarpal Tunnel
SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)

Group: General Forum Members
Points: 4856 Visits: 3949
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.
tfendt
tfendt
SSC-Enthusiastic
SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)

Group: General Forum Members
Points: 109 Visits: 342
Thanks everyone for the input. I will just focus on the short term waits stats and clear out the rest.
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