freebsd:freebsd_bbr
差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 后一修订版 | 前一修订版 | ||
| freebsd:freebsd_bbr [2024/06/02 01:11] – 创建 Hshh | freebsd:freebsd_bbr [2026/08/07 02:27] (当前版本) – Hshh | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | ====== 轻松在 FreeBSD | + | ====== 轻松在现代 |
| 从 14.1 开始 tcphpts, tcp_rack, tcp_bbr 都已经默认编译为模块, | 从 14.1 开始 tcphpts, tcp_rack, tcp_bbr 都已经默认编译为模块, | ||
| 行 27: | 行 27: | ||
| </ | </ | ||
| - | ==== 使应用使用 BBR ==== | + | ==== 过早启动的程序使用 BBR ==== |
| - | 默认在切换前启动的应用并不会使用到切换后的 bbr, 一种方法是重启应用, | + | 默认在切换前启动的程序并不会使用到切换后的 bbr, 一种方法是重启程序 |
| + | |||
| + | 另一种是使用特定设置, 15.1 以前使用 sysctl | ||
| < | < | ||
| sysctl net.inet.tcp.functions_inherit_listen_socket_stack=0 | sysctl net.inet.tcp.functions_inherit_listen_socket_stack=0 | ||
| </ | </ | ||
| - | ==== 系统启动时自动设置 sysctl | + | 15.1 及以后运行以下命令 |
| - | 添加以下内容至 /etc/sysctl.conf 或 /etc/sysctl.conf.local | + | < |
| + | |||
| + | ==== 一些优化参数 | ||
| + | == 20241205 == | ||
| + | 关闭 net.inet.tcp.bbr.measure.use_google 后, 大多数情况不会出现断流< | ||
| < | < | ||
| - | net.inet.tcp.functions_default=bbr | + | net.inet.tcp.bbr.measure.use_google=0 |
| - | net.inet.tcp.functions_inherit_listen_socket_stack=0 | + | |
| </ | </ | ||
| + | |||
| + | == 20260719 == | ||
| + | 可以通过优化 net.inet.tcp.bbr.cwnd.highspeed_min net.inet.tcp.bbr.cwnd.max_target_limit net.inet.tcp.bbr.probertt.cwnd, | ||
| + | * 1Gbps | ||
| + | < | ||
| + | # 1Gbps | ||
| + | net.inet.tcp.bbr.cwnd.highspeed_min=128 | ||
| + | net.inet.tcp.bbr.cwnd.max_target_limit=16 | ||
| + | net.inet.tcp.bbr.probertt.cwnd=16 | ||
| + | net.inet.tcp.sendbuf_inc=262144 | ||
| + | net.inet.tcp.sendbuf_max=16777216 | ||
| + | net.inet.tcp.sendspace=4194304 | ||
| + | </ | ||
| + | * 2.5Gbps | ||
| + | < | ||
| + | # 1Gbps | ||
| + | kern.ipc.maxsockbuf=33554432 | ||
| + | net.inet.tcp.bbr.cwnd.highspeed_min=256 | ||
| + | net.inet.tcp.bbr.cwnd.max_target_limit=16 | ||
| + | net.inet.tcp.bbr.probertt.cwnd=32 | ||
| + | net.inet.tcp.sendbuf_inc=524288 | ||
| + | net.inet.tcp.sendbuf_max=33554432 | ||
| + | net.inet.tcp.sendspace=2097152 | ||
| + | </ | ||
| + | * 10Gbps | ||
| + | < | ||
| + | # 10Gbps | ||
| + | kern.ipc.maxsockbuf=67108864 | ||
| + | net.inet.tcp.bbr.cwnd.highspeed_min=512 | ||
| + | net.inet.tcp.bbr.cwnd.max_target_limit=32 | ||
| + | net.inet.tcp.bbr.probertt.cwnd=128 | ||
| + | net.inet.tcp.sendbuf_inc=1048576 | ||
| + | net.inet.tcp.sendbuf_max=67108864 | ||
| + | net.inet.tcp.sendspace=4194304 | ||
| + | </ | ||
| + | |||
| + | == 20260807 == | ||
| + | 关于这个参数 net.inet.tcp.bbr.cwnd.tar_rtt, | ||
| + | |||
| + | {{tag> | ||
freebsd/freebsd_bbr.1717261898.txt.gz · 最后更改: 由 Hshh
