snippetsqlMajor
How can wait times be higher than clock time?
Viewed 0 times
canwaitclockthantimehigherhowtimes
Problem
When I'm tracking waits with sp_BlitzFirst, I get this detail:
Should that read "for 20 times over the last 5 seconds?" Finding was CLR_SEMAPHORE.
Should that read "for 20 times over the last 5 seconds?" Finding was CLR_SEMAPHORE.
Solution
No - wait stats can (and more often than not, will) total more than the physical time spent for the server itself.
Imagine a situation where 2 separate threads spend the same second waiting for some resource - you would have 2 seconds of wait time for 1 second of clock time.
Each thread has it's own waits - the message is telling you that 20 seconds of wait time for that particular resource occurred over the last 5 seconds of clock time.
Or to put it another way, each core can be running multiple queries at the same time, and multiple cores can add up to even more waits. Which is to say, the unit is really thread·seconds, not seconds.
Imagine a situation where 2 separate threads spend the same second waiting for some resource - you would have 2 seconds of wait time for 1 second of clock time.
Each thread has it's own waits - the message is telling you that 20 seconds of wait time for that particular resource occurred over the last 5 seconds of clock time.
Or to put it another way, each core can be running multiple queries at the same time, and multiple cores can add up to even more waits. Which is to say, the unit is really thread·seconds, not seconds.
Context
StackExchange Database Administrators Q#208372, answer score: 24
Revisions (0)
No revisions yet.