更改文件句柄数
/etc/profile
ulimit -n 327680
修改kernel 参数
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_synack_retries = 3
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_timestamps = 0 这个参数看具体情况,可以不用改
net.ipv4.ip_conntrack_max=655360
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_tw_buckets=5000
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_fin_timeout=10
net.ipv4.tcp_keepalive_time=1800
net.ipv4.tcp_keepalive_intvl=6
net.ipv4.tcp_keepalive_probes=5
net.core.somaxconn=8192
net.ipv4.conf.all.arp_ignore=1
net.ipv4.conf.all.arp_announce=2
net.ipv4.conf.eth0.arp_ignore=1
net.ipv4.conf.eth0.arp_announce=2
net.ipv4.conf.eth1.arp_ignore=1
net.ipv4.conf.eth1.arp_announce=2
centos 6.6 的参数有点变化,因为centos 网卡名字和一些路径有微小的变化
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_synack_retries = 3
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_timestamps = 0 这个参数看具体情况,可以不用改
net.ipv4.ip_conntrack_max=655360
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_tw_buckets=5000
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_fin_timeout=10
net.ipv4.tcp_keepalive_time=1800
net.ipv4.tcp_keepalive_intvl=6
net.ipv4.tcp_keepalive_probes=5
net.core.somaxconn=8192
net.ipv4.conf.all.arp_ignore=1
net.ipv4.conf.all.arp_announce=2
net.ipv4.conf.em1.arp_ignore=1
net.ipv4.conf.em1.arp_announce=2
net.ipv4.conf.em2.arp_ignore=1
net.ipv4.conf.em2.arp_announce=2
net.netfilter.nf_conntrack_max=6553600
net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 60
net.netfilter.nf_conntrack_tcp_timeout_time_wait = 60
net.netfilter.nf_conntrack_tcp_timeout_close_wait=30
net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 60
阅读(2234) | 评论(0) | 转发(0) |