semaphore性能问题_SQL Server性能调整– RESOURCE_SEMAPHORE等待

semaphore性能问题

When dealing with SQL Server performance tuning waits, we may see RESOURCE_SEMAPHORE waits along with other related monitoring that indicates memory as a possible pain point for our server (such as the below image that shows memory being one of the top waits overall).

在处理SQL Server性能优化等待时,我们可能会看到RESOURCE_SEMAPHORE等待以及其他相关监视,这些监视表明内存可能是服务器的痛点(例如下图,显示内存是总体上等待最多的之一)。

Memory showing as the top wait

We should expect to see some waits like SOS_SCHEDULER_YIELD or CX_PACKET, but this wait in high numbers indicates that we want to investigate SQL Server and memory, assuming our server architecture is designed to handle the functionality.

我们应该期望看到一些等待,例如SOS_SCHEDULER_YIELD或CX_PACKET,但是这种等待数量很高,表明我们假设我们的服务器体系结构旨在处理该功能,因此我们希望研究SQL Server和内存。

For example, if we’re using a 4GB memory laptop to run an application server, SQL Server, and ETL processes along with other memory-intensive applications, our design doesn’t match our function. We won’t investigate designs like this and will assume our design matches our function.

例如,如果我们使用4GB内存的笔记本电脑来运行应用程序服务器,SQL Server和ETL进程以及其他占用大量内存的应用程序,则我们的设计与我们的功能不匹配。 我们不会调查这种设计,并会假设我们的设计与我们的功能相符。

正在发现RESOURCE_SEMAPHORE等待 (Uncovering RESOURCE_SEMAPHORE waits)

In the below query, before we do any SQL Server performance tuning, we look at the running queries to find four that return RESOURCE_SEMAPHORE waits (the query text is intentionally commented out):

在下面的查询中,在进行任何SQL Server性能调整之前,我们查看正在运行的查询以找到四个返回RESOURCE_SEMAPHORE等待的查询(查询文本被有意地注释掉):

SELECT
  t1.[last_wait_type] LastWait
  --, t2.[text] QueryText
FROM sys.dm_exec_requests t1
    CROSS APPLY sys.dm_exec_sql_text(t.sql_handle) t2

Resource semaphore waits appear as frequent waits when looking at running queries

We would only run queries like this if we don’t have any regular monitoring in place – otherwise, we would look at our regular monitoring for the cur

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值