单机为1没问题,集群负载后改外0
vim /etc/sysctl.cof
net.ipv4.tcp_timestamps = 0 #改为0
sysctl -p
vm.swappiness=0
net.ipv4.tcp_max_tw_buckets=5000
net.core.somaxconn=1024
net.ipv4.tcp_max_syn_backlog=1024
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout= 30
net.core.somaxconn = 32768
net.ipv4.tcp_tw_recycle = 1
fs.inotify.max_user_watches = 1048576
fs.inotify.max_user_instances = 256
net.ipv4.tcp_keepalive_time = 10
net.ipv4.ip_local_port_range = 1000 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 256000
vm.max_map_count = 262144
fs.file-max = 6815744
net.ipv4.ip_conntrack_max = 1000000
net.ipv4.netfilter.ip_conntrack_max = 1000000
net.ipv4.ip_forward = 1
kernel.watchdog_thresh = 30
net.ipv4.neigh.default.gc_thresh1 = 4096
net.ipv4.neigh.default.gc_thresh2 = 6144
net.ipv4.neigh.default.gc_thresh3 = 8192