IIS7 Optimization - Website requests are >> concurrent
/*调整IIS 7应用程序池队列长度*/
Queue length 5000~20000 (original default 1000, maximum 65535, recommended 10000)
/*调整IIS 7的appConcurrentRequestLimit设置*/
Changed from the original default 5000 suggestion to 20000. (up to 100000)
Direct Run:
C:\Windows\System32\inetsrv\appcmd.exe set config /section:serverRuntime /appConcurrentRequestLimit:20000
This setting can be seen in %systemroot%\System32\inetsrv\config\applicationHost.config.
/*调整machine.config中的processModel>requestQueueLimit的设置*/
Changed from the original default 5000 suggestion to 20000.
(Location similar to C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG)
<configuration> <system.web> <processModel autoConfig="true" requestQueueLimit="20000" memoryLimit="60"/>
/*修改注册表,调整IIS 7支持的同时TCPIP连接数*/
Changed from the original default 5000 suggestion to 20000. Run directly on the command line
reg add HKLM\System\CurrentControlSet\Services\HTTP\Parameters /v MaxConnections /t REG_DWORD /d 20000
By completing the above four settings, you can support 20,000 (or 100,000) simultaneous requests.
IIS application pool settings >>
In the application pool, do the following settings: (windows2003 name/windows2008 name)
/*IIS以内置账户的用户表示运行*/
Identify the NetworkService
/*IIS自动将多长时间不活动的应用程序进程回收掉*/
Recycling Working Process (min) / Fixed Time Interval (min) 0 (Optional 120~800)
(In addition, you need to set the process model-> idle timeout to 0 first)
/*设置每日4:00回收工作进程*/
In the following time reclaim worker/specific time (click the "Add" button to specify the time when a website is idle to start the reclaim application process, under normal circumstances we can set the time to around 2~4 o'clock in the middle of the night)
You can add the following time periods: 08:00, 12:40, 19:00, 01:00
/*设置IIS的使用内存*/
Virtual memory limit (KB) 0
Default 0 is disabled, if enabled the default is 512000 (500 M); It is recommended to set it to no more than 70% of the total virtual memory;
Dedicated memory limit (KB) 5033165
When enabled, the default value is 196608 (192 M); It is recommended to set no more than 60% of the total physical memory; If the system memory is 8G, the value is set to 8*0.6*1024*1024=5033165 (KB)
/*设置处理对应用程序池的请求的最大工作进程数*/
Maximum number of worker processes/Maximum number of worker processes 1 (if session sharing or multi-point login is supported, it can be set to 50~100)
/*指定IIS系统接受到多少请求后就能开始回收应用程序进程了*/
Reclaim worker (number of requests)/request limit is not set
Recycle worker process when consuming too much memory: None selected
Maximum number of failures 60
Startup Time Limit 90 (seconds)
/*适当延长这个时间,避免关闭超时错误*/
Shutdown Time Limit 300 (sec)
/*IIS7中设置缓存的方法就两步 如是负载均衡暂不设置此项(除非支持IP Hash)*/
1. Allow the client to cache - add the parameter cache-control to the http header and set its value to cache
Operation: Select the website to be configured in IIS, then open the http response header on the right, select Add..., and enter the parameter name cache-control and the parameter value cache (case-insensitive) in the pop-up dialog box.
2. Set the expiration time (cache file retention time limit) - Set the cache expiration time in IIS, and the cache in IIS7 is set to "Immediately Invalid" by default
Method: Still the same as in the previous step, open "HTTP Response Header" and select "Set Common Header..." Select "Make web content expired" in the pop-up dialog box and set the expiration time to 7 days later (this time can be set according to the characteristics of the web page in the website and the frequency of page updates).
|