诊断 Sql Server Service Broker 转发性能不佳
我已经在我的开发环境中运行 Service Broker 几个月了,并且具有完全足够的性能,接近每秒 1000 条消息(足以满足我的需求)。
我还一直在真实生产环境的精简副本上运行,其中涉及转发实例,今天第一次通过它推动了一些负载,结果很糟糕!我试图理解我所看到的,但有点挣扎,所以我想我应该把它拿出来看看是否有人可以提供帮助。
首先,消息从头到尾都是通过转发器传送的。然而,当我推送几千条消息时,我看到批量发送了 20 到 100 条消息,然后延迟了一两分钟。消息最终被成功处理。
查看商店(初始发送者)上的队列,有数千条消息等待转发,这些消息正在慢慢流出。
安全设置如下:
Store database -> Certificate -> Forwarding instance -> Windows Security -> Central database
当我打开分析器时,我看到很多错误:
转发实例上的一些示例:
7 - Send IO Error (10054(failed to retrieve text for this error. Reason: 15105))
Forwarded Message Dropped (The forwarded message has been dropped because a transport send error occurred when sending the message. Check previous events for the error.)
在我的“中央”目标实例上:
A corrupted message has been received. The binary message preamble is malformed.
Broker message undeliverable This message was dropped because it could not be dispatched on time. State: 2
任何人都可以帮助我指出我可以进行的一些检查,或者可能是一些明显的检查我错过了。我知道我出了什么问题,但就是看不出是什么。
编辑 - 2011 年 1 月 14 日 - 更多信息: 有关于此的更多信息 - 我们将消息转发实例排除在外,并立即看到了巨大的改进 - 几秒钟内传送了 2000 条消息。
该架构使用传输安全性,因此我们目前正在尝试切换到对话安全性,因为我们已经了解到传输安全性/转发可能会损害性能。我们希望 Dialog 安全性能够以某种方式优化转发实例需要解密的内容,从而提高性能。
星期一我要做的第一件事就是关闭传输层(发起方和转发方之间)的加密,看看这是否是我们的瓶颈所在。这是否可能会导致我们的通信产生很大的开销,或者一个转发实例是否应该不会产生如此大的瓶颈?
I've been running Service Broker in my development environment for a few months now and have had perfectly adequate performance, toward 1000 message per second (plenty for my needs).
I've also been running on a cut-down replica of my real production environment which involves a forwarding instance, and for the 1st time today pushed some load through it with terrible results! I'm trying to understand what I've been seeing, but am struggling a bit so I thought I'd put it out to see if anyone can help.
Firstly, messages are being delivered from start, to end, through the forwarder. However when I pushed a few thousand messages, I saw batches of between 20 to 100 being sent followed by delays of a minute or two. The messages are ultimately processed successfully.
Looking at the queue on the Store (the initial sender) there are thousands of messages sat waiting to be forwarded which are trickling out.
The security setup goes like:
Store database -> Certificate -> Forwarding instance -> Windows Security -> Central database
When I switch on profilers I am seeing lots errors:
Some examples on the forwarding instance:
7 - Send IO Error (10054(failed to retrieve text for this error. Reason: 15105))
Forwarded Message Dropped (The forwarded message has been dropped because a transport send error occurred when sending the message. Check previous events for the error.)
And on my 'central' target instance:
A corrupted message has been received. The binary message preamble is malformed.
Broker message undeliverable This message was dropped because it could not be dispatched on time. State: 2
Can anybody help by pointing me towards some checks I could make, or maybe something obvious that I've missed. I know I've got something wrong but just can't see what.
Edit - 14/1/2011 - more information:
Some more information on this - we took our message forwarding instance out of the equation and saw massive improvements immediately - 2000 messages were delivered in seconds.
The architecture uses transport security so we're currently trying to switch over to dialog security as we've read that transport security / forwarding can harm performance. We're hoping Dialog security will somehow optimize what needs to be decrypted by the forwarding instance therefore improving performance.
First thing Monday I want to switch off encryption on the transport layer (between initiator and forwarder) to see if that is where our bottleneck is occurring. Is it possible that this could cause a big overhead in our communications or should one forwarding instance not produce such a big bottleneck?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
什么 SQL Server 版本?
修复了转发性能的几个问题。我建议您升级到最新的 SQL Server 2008 R2 并部署最新的累积更新。如果您的环境中升级出现问题,您可以仅升级转发器实例。
What SQL Server version?
There were several issues fixed with forwarding performance. I recommend you upgrade to latest SQL Server 2008 R2 and deploy latest cumulative updates. If upgrade is problematic in your environment, you can upgrade only the forwarder instance.
这可能是一个愚蠢的建议,但是您最近更改过网络拓扑吗?也许更换了网线或交换机过热?如果这种情况突然发生,听起来更像是物理变化而不是逻辑变化。我会检查两台机器上的 Windows 事件日志。
This might be a stupid suggestion, but have you changed the network topology lately? Maybe swapped out a network cable or overheated a switch? If this is occurring suddenly, it sounds more like a physical change than a logical one. I'd check the windows event log on both machines.
是的,Dialog 安全性是与转发器结合使用的最佳方法。否则开销将是巨大的。
Yes, Dialog security is the best approach in conjunction with forwarders. Otherwise overhead will be enormous.