Closed fscarmen closed 11 months ago
内核模块编译失败了, 编译错误在这个文件里。
/var/lib/dkms/tcp-brutal/1.0.1/build/make.log
另外我注意到你在 Ubuntu 20.04 LTS 上使用 6.6.1
内核, 这类问题通常是你系统里的 gcc 太旧, 无法为你额外安装的最新内核编译内核模块。
升级编译器通常可以解决这个问题(但是相当麻烦), 我通常建议把系统升级到较新版本(例如 Ubuntu 22.04 LTS), 或者降级内核到 5.x(通常是需要卸载你安装的最新内核, 并在重启后用 uname -r
确认是否切换成功)。
内核模块编译失败了, 编译错误在这个文件里。
/var/lib/dkms/tcp-brutal/1.0.1/build/make.log
另外我注意到你在 Ubuntu 20.04 LTS 上使用
6.6.1
内核, 这类问题通常是你系统里的 gcc 太旧, 无法为你额外安装的最新内核编译内核模块。升级编译器通常可以解决这个问题(但是相当麻烦), 我通常建议把系统升级到较新版本(例如 Ubuntu 22.04 LTS), 或者降级内核到 5.x(通常是需要卸载你安装的最新内核, 并在重启后用
uname -r
确认是否切换成功)。
搞掂了,把 Ubuntu 20.04 升级为 22.04 之后就可以正确安装了。 还想问两个问题:
E: Unable to locate package linux-headers-6.1.0-9-amd64 E: Couldn't find any package by glob 'linux-headers-6.1.0-9-amd64' bash <(curl -fsSL https://tcp.hy2.sh): error: Cannot install 'linux-headers-6.1.0-9-amd64' with detected package manager, please install it manually.
这是什么问题
@jameqq
E: Unable to locate package linux-headers-6.1.0-9-amd64 E: Couldn't find any package by glob 'linux-headers-6.1.0-9-amd64' bash <(curl -fsSL https://tcp.hy2.sh): error: Cannot install 'linux-headers-6.1.0-9-amd64' with detected package manager, please install it manually.
看起来你在用 Debian 12 + 内核包版本 6.1.0-9
, 但是 Debian 软件仓库已经不再提供 6.1.0-9
内核(及其 headers)的下载。
你可以试试先升级系统(通过 apt update && apt upgrade
), 然后重启, 再重新运行此脚本。
内核版本不是仓库最新的话,确实要先升级版本。apt upgrade之类的,不然就会报错
@fscarmen
- 不是从查内核加载的方法,有些什么更直观办法看正常工作呢?(像多路复用,可以用并发TCP来看)
可以用仓库 example/
目录里的 python 测试脚本, 在同一台机器上同时开启 server.py
和 client.py
。 并把客户端参数设置成一个比较低的带宽(比如 python client.py 127.0.0.1 10
, 连接本机的 server.py
, 限速到 10 Mbps), 如果服务端和客户端都能正常启动, 并且测得 Current speed
是你设置的低带宽, 那就是正常工作了。
- 与BBR搭配有没有问题呢?相互不影响还是只能两者选其一的?
只有支持 brutal 的应用程序能选择使用 brutal, 不支持 brutal 的应用程序仍然使用你配置的默认拥塞控制(你配置了 bbr 那就是 bbr), 请参考 这里的说明。
请保持 bbr 相关配置(例如通过 net.ipv4.tcp_congestion_control=bbr
把 bbr 设置为全局默认的拥塞控制算法), 以保证不支持 brutal 的(绝大部分)应用程序的 TCP 传输速度。
@fscarmen
- 不是从查内核加载的方法,有些什么更直观办法看正常工作呢?(像多路复用,可以用并发TCP来看)
可以用仓库
example/
目录里的 python 测试脚本, 在同一台机器上同时开启server.py
和client.py
。 并把客户端参数设置成一个比较低的带宽(比如python client.py 127.0.0.1 10
, 连接本机的server.py
, 限速到 10 Mbps), 如果服务端和客户端都能正常启动, 并且测得Current speed
是你设置的低带宽, 那就是正常工作了。
- 与BBR搭配有没有问题呢?相互不影响还是只能两者选其一的?
只有支持 brutal 的应用程序能选择使用 brutal, 不支持 brutal 的应用程序仍然使用你配置的默认拥塞控制(你配置了 bbr 那就是 bbr), 请参考 这里的说明。
请保持 bbr 相关配置(例如通过
net.ipv4.tcp_congestion_control=bbr
把 bbr 设置为全局默认的拥塞控制算法), 以保证不支持 brutal 的(绝大部分)应用程序的 TCP 传输速度。
谢谢,原来 README.md 都有写了,是我没有先在里面找答案,谢谢!
系统信息
安装错误日志
debug 安装