开发者

SQL Server 2008 Activity Monitor Resource Wait Category: Does Latch include CPU or just disk IO?

开发者 https://www.devze.com 2023-03-29 06:06 出处:网络
In SQL Server 2008 Activity Monitor, I see Wait Time on Wait Category \"Latch\" (not Buffer Latch) spike above 10,000ms/sec at times. Average Waiter Count is under 10, but this is by far the highest a

In SQL Server 2008 Activity Monitor, I see Wait Time on Wait Category "Latch" (not Buffer Latch) spike above 10,000ms/sec at times. Average Waiter Count is under 10, but this is by far the highest area of waits in a very busy system. Disk IO is almost zero and page life expectancy is over 80,000, so I know it's not slowed down by disk hardware and assume it's not even touching SAN cache. Does this mean SQL Server is waiting on CPU (i.e. resolving a bajillion locks) or waiting to transfer data from the local server's cache memory for processing?

Background: System is a 48-core running SQL Server 2008 Enterprise w/ 64GB of RAM. Queries are under 100ms in response time - for now - but I'm trying to understand the bottlenecks before they get to 100x that level.

Class                         Count     Sum Time   Max Time 
ACCESS_METHODS_DATASET_PARENT 649629086 3683117221 45600 
BUFFER                         20280535   23445826  8860 
NESTING_TRANSACTION_READONLY   22309954  102483312   187 
NESTING_TRANSACTION_FULL        7447169  123234478开发者_运维百科   265 


Some latches are IO, some are CPU, some are other resource. It really depends on which particular latch type you're seeing this. sys.dm_os_latch_stats will show which latches are hot in your deployment.

I wouldn't worry about the last three items. The two nesting_transaction ones look very healthy (low average, low max). Buffer is also OK, more or less, although the the 8s max time is a bit high.

The AM_DS_PARENT latch is related to parallel queries/parallel scans. Its average is OK, but the max of 45s is rather high. W/o going into too much detail I can tell that long wait time on this latch type indicate that your IO subsystem can encounter spikes (and the max 8s BUFFER latch waits corroborate this).

0

精彩评论

暂无评论...
验证码 换一张
取 消