Server
Linux
关闭 SELinux: 使用命令
sestatus查看; 使用命令setenforce 0临时关闭; 通过修改/etc/selinux/config文件(设置SELINUX=disabled)永久关闭.全局最大打开文件数. 使用命令
cat /proc/sys/fs/file-nr | perl -F'\s+' -lane 'print $F[2]'查看.# vi /etc/sysctl.conf# 进程最大可打开文件数fs.nr_open = 1024000# 全局最大可打开文件数fs.file-max = 1024000# 修改后使用 sysctl -p /etc/sysctl.conf 重启服务
- 进程最大打开文件数. 使用命令
ulimit -n查看; 使用命令ulimit -n 1024000临时修改; 或修改配置文件永远生效. ```confvi /etc/security/limits.conf
- hard nofile 1024000
- soft nofile 1024000 ```
Tools
- ideawu/c1000k: A tool to test if you OS supports 1 million connections(c1000k).
