204 字
1 分钟
常用bbr参数
DMIT
cat > /etc/sysctl.conf << 'EOF'net.core.default_qdisc = fqnet.core.rmem_max = 67108848net.core.wmem_max = 67108848net.core.somaxconn = 4096net.ipv4.tcp_max_syn_backlog = 4096net.ipv4.tcp_congestion_control = bbrnet.ipv4.tcp_rmem = 16384 16777216 536870912net.ipv4.tcp_wmem = 16384 16777216 536870912net.ipv4.tcp_adv_win_scale = -2net.ipv4.tcp_sack = 1net.ipv4.tcp_timestamps = 1kernel.panic = -1vm.swappiness = 0EOF
sysctl -p && sysctl --systemRFC
cat > /etc/sysctl.conf << 'EOF'fs.file-max = 6815744net.ipv4.tcp_max_syn_backlog = 8192net.core.somaxconn = 8192net.ipv4.tcp_tw_reuse = 1net.ipv4.tcp_abort_on_overflow = 1net.core.default_qdisc = fqnet.ipv4.tcp_congestion_control = bbrnet.ipv4.tcp_no_metrics_save = 1net.ipv4.tcp_ecn = 0net.ipv4.tcp_frto = 0net.ipv4.tcp_mtu_probing = 0net.ipv4.tcp_rfc1337 = 1net.ipv4.tcp_sack = 1net.ipv4.tcp_fack = 1net.ipv4.tcp_window_scaling = 1net.ipv4.tcp_adv_win_scale = 2net.ipv4.tcp_moderate_rcvbuf = 1net.ipv4.tcp_fin_timeout = 30net.ipv4.tcp_rmem = 4096 87380 67108864net.ipv4.tcp_wmem = 4096 65536 67108864net.core.rmem_max = 67108864net.core.wmem_max = 67108864net.ipv4.udp_rmem_min = 8192net.ipv4.udp_wmem_min = 8192net.ipv4.ip_local_port_range = 1024 65535net.ipv4.tcp_timestamps = 1net.ipv4.conf.all.rp_filter = 0net.ipv4.conf.default.rp_filter = 0net.ipv4.ip_forward = 1net.ipv6.conf.all.forwarding = 1net.ipv6.conf.default.forwarding= 1net.ipv4.conf.all.route_localnet= 1EOF
sysctl -p && sysctl --systemBAGE
cat > /etc/sysctl.conf << EOFfs.file-max = 6815744net.ipv4.tcp_no_metrics_save=1net.ipv4.tcp_ecn=0net.ipv4.tcp_frto=0net.ipv4.tcp_mtu_probing=0net.ipv4.tcp_rfc1337=0net.ipv4.tcp_sack=1net.ipv4.tcp_fack=1net.ipv4.tcp_window_scaling=1net.ipv4.tcp_adv_win_scale=1net.ipv4.tcp_moderate_rcvbuf=1net.core.rmem_max=33554432net.core.wmem_max=33554432net.ipv4.tcp_rmem=4096 87380 33554432net.ipv4.tcp_wmem=4096 16384 33554432net.ipv4.udp_rmem_min=8192net.ipv4.udp_wmem_min=8192net.ipv4.ip_forward=1net.ipv4.conf.all.route_localnet=1net.ipv4.conf.all.forwarding=1net.ipv4.conf.default.forwarding=1net.core.default_qdisc=fqnet.ipv4.tcp_congestion_control=bbrnet.ipv6.conf.all.forwarding=1net.ipv6.conf.default.forwarding=1EOFsysctl -p && sysctl --system