按每台机器实测推导的 TCP 调优工具. 不套用固定参数, 实测 BDP 与限速器拐点.
安装
bash <(curl -fsSL https://raw.githubusercontent.com/Kylin010/tcpfit/main/tcpfit.sh)跑完直接出菜单, 选 1 全自动. 只问三个问题: 带宽、测速对端、机器用途.
固定版本并校验:
V=v0.3.8
curl -fsSLO https://github.com/Kylin010/tcpfit/releases/download/$V/tcpfit.sh &&
curl -fsSLO https://github.com/Kylin010/tcpfit/releases/download/$V/install.sh &&
curl -fsSLO https://github.com/Kylin010/tcpfit/releases/download/$V/SHA256SUMS &&
sha256sum -c SHA256SUMS &&
bash tcpfit.sh它做什么
- 按
带宽 × RTT推导缓冲区, 不是套固定值 - 实测服务商在你端口上的限速器拐点, 贴着它做出向整形
- 没有限速器就不整形, 不会凭空给机器加上限
回滚
tcpfit rollback # 按快照逐项写回全部 33 项参数
tcpfit shape --off # 只去掉整形, 保留基础调优首次改动前自动存快照. 所有改动落在独立文件, 不碰 /etc/sysctl.conf.
更新
tcpfit update或菜单选 8. 不会自动更新, 发现新版本会先问你.
已知限制
- 瓶颈在国际链路而非端口时, 整形不会带来提升
- 扫描上限 2500 Mbit, 超出只提醒(
--cap可调) - 需要 Linux + systemd + iproute2
- 多机编排尚未在真实环境验证, 暂不建议使用