进程可创建的最大连接数
2016-03-30 10:21
204 查看
http://blog168.chinaunix.net/space.php?uid=116213&do=blog&id=328738
linux 连接数的限制 socket连接数的理论值应该和一个进程所能打开的最大文件描述符数相等
查看
ulimit -a
修改linux socket最大连接数 有两种方法: 1、ulimit -n 5000 把允许最大打开的描述符修改为5000,只对当前终端打开的应用程序有效。 2、修改/etc/security/limits.conf在该文件中添加以下两行: * soft nofile 5000 * hard nofile 20000
解释: * 表示该配置对所有用户均有效 soft 表示软连接数 hard 表示硬连接数 nofile 配置是针对描述符的
注意内核的限制 sysctl -a看看那个maxfiles之类的参数。
windows连接数的限制
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
TcpNumConnections Key: Tcpip\Parameters取值类型:REG_DWORD - Number取值范围:0 - 0xfffffe缺省值:0xfffffe描述:本参数限制可以同时打开的TCP连接的数量
MaxUserPortkey: Tcpip\Parameters取值类型:REG_DWORD - Number取值范围:5000-65534 (十进制)缺省值:0x1388 (5000 十进制)描述:控制一个应用程序可以打开的最多端口数量。通常,短命的端口在1024-5000之间分配。当试图发起5000以上端口的连接,系统将出现WSAENOBUFS(10055)错误:因为队列满或者系统缺乏足够的缓冲空间
TcpNumConnections
DescriptionSpecifies the maximum number of connections that TCP can have open simultaneously.If the value of this entry is 0, then you cannot establish any connections.
Data type Range Default valueREG_DWORD0x40000–0xFFFFFE0xFFFFFE
MaxUserPort
DescriptionSpecifies the highest port number that TCP can assign when an application requests an available user port from the system. Typically, ephemeral ports (those used briefly) are allocated to port numbers 1024 through 5000.
Data type Range Default valueREG_DWORD5,000–65,534 (port number)5000
NoteWindows Server 2003 does not add this entry to the registry. You can add it by using the registry editor Regedit.exe.
linux 连接数的限制 socket连接数的理论值应该和一个进程所能打开的最大文件描述符数相等
查看
ulimit -a
修改linux socket最大连接数 有两种方法: 1、ulimit -n 5000 把允许最大打开的描述符修改为5000,只对当前终端打开的应用程序有效。 2、修改/etc/security/limits.conf在该文件中添加以下两行: * soft nofile 5000 * hard nofile 20000
解释: * 表示该配置对所有用户均有效 soft 表示软连接数 hard 表示硬连接数 nofile 配置是针对描述符的
注意内核的限制 sysctl -a看看那个maxfiles之类的参数。
windows连接数的限制
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
TcpNumConnections Key: Tcpip\Parameters取值类型:REG_DWORD - Number取值范围:0 - 0xfffffe缺省值:0xfffffe描述:本参数限制可以同时打开的TCP连接的数量
MaxUserPortkey: Tcpip\Parameters取值类型:REG_DWORD - Number取值范围:5000-65534 (十进制)缺省值:0x1388 (5000 十进制)描述:控制一个应用程序可以打开的最多端口数量。通常,短命的端口在1024-5000之间分配。当试图发起5000以上端口的连接,系统将出现WSAENOBUFS(10055)错误:因为队列满或者系统缺乏足够的缓冲空间
TcpNumConnections
DescriptionSpecifies the maximum number of connections that TCP can have open simultaneously.If the value of this entry is 0, then you cannot establish any connections.
Data type Range Default valueREG_DWORD0x40000–0xFFFFFE0xFFFFFE
MaxUserPort
DescriptionSpecifies the highest port number that TCP can assign when an application requests an available user port from the system. Typically, ephemeral ports (those used briefly) are allocated to port numbers 1024 through 5000.
Data type Range Default valueREG_DWORD5,000–65,534 (port number)5000
NoteWindows Server 2003 does not add this entry to the registry. You can add it by using the registry editor Regedit.exe.
相关文章推荐
- Linux权限360度赤裸裸华丽丽大曝光连载之二:SetUID
- Linux下如何生成core dump文件
- Objective-C Runtime
- JS、C#方法互相调用示例
- 配置Mysql时候遇到一些坑
- FFmpeg的HEVC解码器源码简单分析:解析器(Parser)部分
- Block产生的内存泄露,以及解决方法
- MySQL validate_password 插件
- javascript设计模式(一)--面向对象
- linux kernel的中断子系统之(九):tasklet
- 光晶片
- form表单的多种提交方式
- 单工、半双工、全双工通信
- VMware SDS 之二 : VSAN用在哪?
- Random的setSeed方法
- 滚动轴承特征频率计算推导过程
- Android--activity获取返回值
- Linux权限360度赤裸裸华丽丽大曝光连载之一:从ls开始
- fedora 15 iso 硬盘安装
- Systemd 进程管理器