http://www.blogjava.net/yongboy/archive/2013/05/13/399203.html    100万并发设置

http://blog.csdn.net/longhumen1214/article/category/1438633      端口65535原理

接收连接数和发起连接数是2个概念

IPV4和IPV6

 

接收连接数取决于单个进程能打开的文件个数,比如要支持100万并发,系统设置方面需要如下设置
在/etc/sysctl.conf中添加如下配置:

fs.file-max = 1048576
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.tcp_mem = 786432 2097152 3145728
net.ipv4.tcp_rmem = 4096 4096 16777216
net.ipv4.tcp_wmem = 4096 4096 16777216

net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
在/etc/security/limits.conf中添加如下配置:

* soft nofile 1048576
* hard nofile 1048576

相关文章:

  • 2022-01-05
  • 2021-07-10
  • 2021-06-17
  • 2021-11-09
  • 2021-05-23
  • 2021-05-10
猜你喜欢
  • 2021-12-22
  • 2021-06-06
  • 2022-01-22
  • 2021-10-21
  • 2022-01-18
  • 2022-12-23
相关资源
相似解决方案