apernet / hysteria

Hysteria is a powerful, lightning fast and censorship resistant proxy.
https://v2.hysteria.network/
MIT License
15.06k stars 1.68k forks source link

BBR transmits too aggressively under throttled network #1180

Open keytouch opened 3 months ago

keytouch commented 3 months ago

Describe the bug With normal ISP broadband with 30Mbps up, speedtest utilize about 70Mbps with BBR. While effective bandwidth is of course within 30Mbps. Aggressive transmiting behaviour might lead to latency increase and jitters... Maybe there is something odd with congestion window detection.

To Reproduce Just run hysteria-linux-amd64-avx speedtest To mitigate the issue, I have to lower maxStreamReceiveWindow or use brutal, which is not even a work around. I am using 2.5.0.

Expected behavior Transmit rate should not shoot much beyond 30Mbps.

its0ka commented 3 months ago

woah, really, it transmits at 38mbit/s to my 20mbit/s network, everything else on the network just dies

its0ka commented 5 days ago

and also kernel TCP BBR on linux works like 10 times better under the same network conditions, i tested on my local network with "tc qdisc replace dev enp2s14 root netem limit 999999999 delay 100ms 50ms loss random 10%" on the server and set network card to 10mbit/s on client and got hysteria bbr: 700kbit/s iperf3 (network card was transfering at 1.4mbit/s) kernel bbr: 8mbit/s iperf3 (network card was transfering at 8.5mbit/s)

but with "tc qdisc replace dev enp2s14 root netem limit 999999999 delay 100ms 00ms loss random 10%" i get much more similar results, seems like hysteria bbr hates jitter

on my isp the internet in the evening starts having up to 10% packet loss and 40ms jitter so that test was realistic