??????????Linux TCP???????
???????????? ???????[ 2015/2/27 11:23:30 ] ????????Linux ?????? ??????
?????????????????????openvpn?????????????????????p2p????……????????????????????p2p????????????????е????????б???????BT??????????VPN???????????
????????ο????????
???????Linux?μ????TCP??????????????????????
????Linux Tuning
????????????????????
???????????
????????????????????????????????
?????????????????openvz??VPS?????????????????????????????openvz??VPS??VPN??????????????????
?????????????? /etc/sysctl.conf ???????????????????????????????
????sysctl -p
????????????Ч??
???????????????????????????????Щlinux?????????:
????fs.file-max = 51200
????#??????????????????
????net.ipv4.tcp_syncookies = 1
????#???????SYN Cookies????????SYN?????????????????cookies????????????????SYN??????????0?????????
????net.ipv4.tcp_tw_reuse = 1
????#??????????á??????TIME-WAIT sockets?????????μ?TCP?????????0?????????
????net.ipv4.tcp_tw_recycle = 0
????#???????TCP??????TIME-WAIT sockets?????????????0?????????
????#????NAT?豸???????????????0??
????net.ipv4.tcp_fin_timeout = 30
????#????????? TIMEOUT ???
????net.ipv4.tcp_keepalive_time = 1200
????#?????keepalive????????TCP????keepalive?????????????2С??????20?????
????net.ipv4.ip_local_port_range = 10000 65000 #???????????????????Χ????????o?С??32768??61000?????10000??65000???????????????????????????????????????????????
????net.ipv4.tcp_max_syn_backlog = 8192
????#???SYN???е?????????1024???????г????8192????????????????????????????????
????net.ipv4.tcp_max_tw_buckets = 5000
????#???????????TIME_WAIT????????????????????????TIME_WAIT????????????????????????
????#?????????????汾????**3.7.1**?????????????tcp_fastopen??
????net.ipv4.tcp_fastopen = 3
??????Σ??????????????????????????????????????????? TCP ???????????E??????……?о?????????????ζ?????? = =??
# increase TCP max buffer size settable using setsockopt()
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
# increase Linux autotuning TCP buffer limit
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
# increase the length of the processor input queue
net.core.netdev_max_backlog = 250000
# recommended for hosts with jumbo frames enabled
net.ipv4.tcp_mtu_probing=1
???????????漰????? TCP ???????????????????????????????????????????????飺
????sysctl net.ipv4.tcp_available_congestion_control
??????????????????htcp??hybla???????????????modprobe??????飺
????/sbin/modprobe tcp_htcp
????/sbin/modprobe tcp_hybla
???????????????????????????ο??£? TCP????????? ????? ??????? ??????? ????????????????漰???????????????????????????Hybla???????λ???????飬???????Hybla?????????????????????? TCP ????????????????????????????????????htcp?????????????cubic?????????Ч???????????htcp???????б?????????????VPS?У?????????????
????#???? TCP ?????? hybla
????net.ipv4.tcp_congestion_control=hybla
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11