echo 'alias net-pf-10 off
alias ipv6 off'
# write by dicc >> /etc/modprobe.conf
echo '
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
net.ipv4.tcp_syncookies = 1
net.ipv4.netfilter.ip_conntrack_max = 2500000
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 0
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_mem = 196608 262144 393216
net.ipv4.tcp_max_syn_backlog = 4096
net.core.netdev_max_backlog = 2500
net.ipv4.tcp_synack_retries = 3
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.tcp_fin_timeout = 25
vm.min_free_kbytes = 65536
vm.swappiness = 0
# write by dicc ' > /etc/sysctl.conf
大并发服务器sysctl.conf
kernel.shmall = 4294967296
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.netfilter.ip_conntrack_max = 2500000
net.ipv4.ip_conntrack_max = 655360
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_mem = 196608 262144 393216
net.ipv4.tcp_max_syn_backlog = 4096
net.core.netdev_max_backlog = 2500
net.ipv4.tcp_synack_retries = 3
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.tcp_fin_timeout = 25
vm.min_free_kbytes = 65536
vm.swappiness =0
net.ipv4.tcp_keepalive_time = 300
net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 600
net.ipv4.tcp_max_tw_buckets = 5000
net.core.somaxconn = 512
net.ipv4.tcp_retries2 = 5
net.ipv4.tcp_keepalive_intvl = 35
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_wmem = 8192 131072 33554432
net.ipv4.tcp_rmem = 8192 131072 33554432
阅读(1010) | 评论(0) | 转发(0) |