- 论坛徽章:
- 0
|
有对/etc/sysctl.conf文件加了下面的选项:
fs.nfs.nlm_udpport = 0
net.core.rmem_max = 524288
net.core.wmem_max = 524288
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.ipv4.route.gc_thresh = 131072
net.ipv4.route.max_size = 2097152
net.core.somaxconn = 819200
net.ipv4.tcp_max_syn_backlog = 81920
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_keepalive_time = 30
fs.file-max = 8061540
net.ipv4.tcp_rmem = 40960 873800 1672160
net.ipv4.tcp_wmem = 40960 655360 1672160
net.ipv4.ip_local_port_range = 3000 65000
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
现在系统能够支持的最大半连接数为:512(以前为256)
然后分别对每一个选项后都加0:如net.core.rmem_max = 5242880,从起系统,进行测试,但是最大半连接数仍为512。
注:以上操作在每次修改后都需要从起系统,网上说的sysctl -p直接生效是不对的(至少在我现在的系统上,直接用这个命令不能生效)。
以上测试说明至少说明了两点:
1.系统所支持的半连接数和内核版本版本无关(我的内核为2.6.30),并且系统所能支持的半连接数是可以修改的
2.在上面的某个选项会影响到系统所支持的半连接数。 |
|