単台Linuxは最大1万個の同時接続しかサポートしていませんか?

819 ワード

実際の作業では、1台のLinuxサーバーが1万個以上の接続をした場合(16 core+32 G 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.       。
続々と更新する