当前请求队列及耗时
rem 当前超过1秒的请求
C:\Windows\System32\inetsrv>appcmd.exe list request /elapsed:1000
调整IIS7应用程序池队列长度
- 依次打开,IIS管理器 > 应用程序池 > 高级设置,修改队列长度为65535。
调整IIS 7的appConcurrentRequestLimit设置
- 打开%systemroot%\System32\inetsrv\config\applicationHost.config,将appConcurrentRequestLimit的值由默认5000改为100000。
c:\windows\system32\inetsrv\appcmd.exe set config /section:serverRuntime /appConcurrentRequestLimit:100000
调整machine.config中的processModel>requestQueueLimit的设置
- 打开%windir%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config,将requestQueueLimit的值由默认5000改为100000。
<configuration>
<system.web>
<processModel autoConfig="false" maxWorkerThreads="200" minWorkerThreads="50" requestQueueLimit="100000"/>
</system.web>
</configuration>
调整aspnet.conf中的maxConcurrentRequestsPerCPU
- By default, ASP.NET 4.0 is configured to support 5,000 connections per CPU. To support additional connections per CPU, change the maxConcurrentRequestsPerCPU setting
in aspnet.config:
<system.web>
<applicationPool maxConcurrentRequestsPerCPU="20000" />
</system.web>
- This file is located in the .NET Framework system directory (%windir%\Microsoft.NET
\Framework\v4.0.30319 for 32-bit and %windir%\Microsoft.NET\Framework64\v4.0.30319 for 64-bit operating systems).
修改注册表,调整IIS 7支持的同时TCPIP连接数
- 在HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters节,将默认连接数5000改为100000。
reg add HKLM\System\CurrentControlSet\Services\HTTP\Parameters /v MaxConnections /t REG_DWORD /d 1000000
web guarden
- 在cpu/内存不高的情况下,加大并发数;将进程数修改5或更多
- log4net的日志文件名字需要修改, 加入processid
REF