Windows XP & Server 连接数
恩,之前也遇到过这个问题,当有大量的连接请求的时候,windows xp和server都有可能会陷入等待引起事务失败之类的。所以要修改一下,这个其实比较简单,一般Windows系统都会提示的,看MS KB929851.这个文章之类的……
恩,这里zz别人写的一个:
http://ssmax.net/archives/916.html
除了调整tcpip.sys 的并发连接数,还需要修改windows并发连接数上限,默认大概只有5k左右
最重要的两个注册表键值 TcpNumConnections(TCP连接上限),MaxUserPort(能使用的端口数,默认5000)
还有其他的一些调整参数,具体如下:
下来是zz别人的文章:
Configure the max limit for concurrent TCP connections
To keep the TCP/IP stack from taking all resources on the computer, there are different parameters that control how many connections it can handle. If running applications that are constantly opening and closing connections (P2P), or are providing a service which many tries to connect to at the same time (Web-server like IIS), then one can improve the performance of these applications by changing the restriction limits.
here is a parameter that limits the maximum number of connections that TCP may have open simultaneously.
[HKEY_LOCAL_MACHINE \System \CurrentControlSet \Services \Tcpip \Parameters]
TcpNumConnections = 0×00fffffe (Default = 16,777,214)Note a 16 Million connection limit sounds very promising, but there are other parameters (See below), which keeps us from ever reaching this limit.
When a client makes a connect() call to make a connection to a server, then the client invisible/implicit bind the socket to a local dynamic (anonymous, ephemeral, short-lived) port number. The default range for dynamic ports in Windows is 1024 to 5000, thus giving 3977 outbound concurrent connections for each IP Address. It is possible to change the upper limit with this DWORD registry key:
HKEY_LOCAL_MACHINE \System \CurrentControlSet \Services \Tcpip \Parameters]
MaxUserPort = 5000 (Default = 5000, Max = 65534)Note it is possible to reserve port numbers so they aren’t used as dynamic ports in case one have a certain application that needs them. This is done by using the ReservedPorts (Q812873) setting.
Note Vista changes the default range from 1024-5000 to 49152-65535, which can be controlled with the dynamicport setting using netsh. More Info MS KB929851.
More Info The Cable Guy – Ephemeral, Reserved, and Blocked Port Behavior
More Info MS KB Q196271
More Info MS KB Q319502
More Info MS KB Q319504
More Info MS KB Q328476
More Info MS KB Q836429