单台Linux是否只支持最多1万个并发连接?

原创
2016/02/24 15:57
阅读数 1.4K

在实际工作中,观察到单台Linux服务器超过1万个连接时(16core+32G Ram),系统进入不稳定期,如果提升连接数?

http://highscalability.com/blog/2013/5/13/the-secret-to-10-million-concurrent-connections-the-kernel-i.html

http://www.kegel.com/c10k.html

https://github.com/yaocoder/HPNetServer


环境:

#uname -a
Linux 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

#cat /etc/redhat-release
CentOS release 6.5 (Final)
16 core + 32G Ram

修改一些基本配置

#ulimit -n 1000000

#cat /etc/security/limits.conf
* soft nofile 1000000
* hard nofile 1000000

#cat /proc/sys/fs/file-max
1000000

#vi /etc/rc.local
ulimit -SHn 1000000

#vi /etc/sysctl.conf
fs.file-max = 1000000


#cat /proc/sys/fs/file-nr
#输出三段数字的解释 1.已经分配的文件句柄数,2.已经分配但没有使用的文件句柄数,3.最大文件句柄数。

陆续更新


展开阅读全文
加载中

作者的其它热门文章

打赏
1
3 收藏
分享
打赏
0 评论
3 收藏
1
分享
返回顶部
顶部