修改# vi /etc/sysctl.conf
# tells the Kernel it's ok if services bind to non-existant IP ADDR
# net.ipv4.ip_nonlocal_bind = 1
# defines the size of the kernel queue for accepting new connections, Defaults to 128
net.core.somaxconn = 40000
# Maximum number of remembered connection requests, Defaults to 1024
net.ipv4.tcp_max_syn_backlog = 40000
# Tuning TCP Ports, increase the range to allow for more connections.
# The number of avaliable ports limits the number of simultanious open connections.
net.ipv4.ip_local_port_range = 1024 65535
# Tell kernel to reuse faster the connection in TIME_WAIT
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
# Resetting the File Descriptors, the maximum number of open files allowed per process
fs.file-max = 1000000