[翻译]安装Windows Server 2003 SP2可能会影响SQL Server 性能
Scalable Networking Pack (常见问题 详细描述)在Server 2003安装SP2后会默认被打开,打开此功能可以把对网络数据包的处理从CPU分担一部分到网卡上,但这可能会引起SQL Server性能问题,详情可以看下面的KB:
http://support.microsoft.com/kb/942861
http://support.microsoft.com/kb/918483
另外发现SNP会使SQL Server对事务的吞吐量变小以及使不同查询语句之间的执行间隔变长,比如,有一个事务包含多个查询语句,并且每个语句的执行时间很短,那么他们执行的时间总和应该也会比较短,比如下面的Profiler追踪(注意语句的执行间隔):
当SNP开启后,你可以看到下面的Profiler数据,注意其中不同语句的执行间隔,基本都在500ms左右:
这种执行间隔明显会影响到并发性,下表显示了SNP启用和禁用后相同工作负荷的执行时间:
Implicit Transaction Summary SNP Enabled
spid TransactionID TranStart TranEnd TranDuration sum_batch_duration batch_count delta
------- -------------- ------------- ------------ ------------- -------------------- -------------- --------
57 916972 09:40:24.450 09:41:17.623 53173 601 516 52572
57 896243 09:39:31.620 09:40:01.840 30220 322 301 29898
57 877227 09:39:12.120 09:39:15.293 3173 306 161 2867
57 876313 09:38:58.590 09:38:58.603 13 0 1 13
57 895388 09:39:18.510 09:39:18.527 16 16 4 0
57 915675 09:40:02.653 09:40:02.670 16 16 4 0
Implicit Transaction Summary SNP Disabled
spid TransactionID TranStart TranEnd TranDuration sum_batch_duration batch_count delta
------- -------------- ------------ ------------ ------------- -------------------- -------------- --------
54 127910 11:13:47.287 11:13:52.490 5203 4060 516 1143
54 107344 11:13:23.380 11:13:24.427 1046 382 301 664
51 87187 11:12:50.067 11:12:50.550 483 0 1 483
54 88182 11:13:03.987 11:13:07.237 3250 2878 161 372
51 106432 11:13:10.487 11:13:10.487 0 0 1 0
54 126550 11:13:25.490 11:13:26.007 516 516 4 0
Server 2008 的SNP默认是关闭的,已经装上SP2的Server 2003用户可以通过下面的补丁关闭SNP:http://support.microsoft.com/default.aspx?scid=kb;EN-US;948496 或者使用下面的方法手工关闭:
1. Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
2. Double-click the EnableTCPChimney registry entry.
3. In the Edit DWORD Value dialog box, type 0 in the Value data box, and then click OK.
4. Double-click the EnableRSS registry entry.
5. In the Edit DWORD Value dialog box, type 0 in the Value data box, and then click OK.
6. Double-click the EnableTCPA registry entry.
7. In the Edit DWORD Value dialog box, type 0 in the Value data box, and then click OK.
8. Restart the server.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· [AI/GPT/综述] AI Agent的设计模式综述