flxn / tor-relay-configurator

The tor-relay.co configurator
https://tor-relay.co/
MIT License
52 stars 15 forks source link

Adding TCP BBR #15

Closed ghost closed 5 years ago

ghost commented 5 years ago

https://github.com/LiveChief/tcp-bbr-install

https://medium.com/google-cloud/tcp-bbr-magic-dust-for-network-performance-57a5f1ccf437

https://cloud.google.com/blog/products/gcp/tcp-bbr-congestion-control-comes-to-gcp-your-internet-just-got-faster

this make TCP super fast and should help speed up tor.

flxn commented 5 years ago

Interesting. I can't find any resources wether Tor will benefit from this or not. I'll look into that, maybe it could be useful.

ghost commented 5 years ago

The Tor Ticket

https://trac.torproject.org/projects/tor/ticket/30420

Simple TCP BBR Install Script

https://raw.githubusercontent.com/LiveChief/Fun-Linux-Scripts/master/tcp-bbr.sh

irl commented 5 years ago

I really believe this is a bad idea, and will harm the Tor network. BBR is designed for the use case of YouTube, where a user watches one video at a time. Tor relays maintain thousands of TCP connections to other relays, and those flows won't compete fairly when BBR is used.

In the best case, the bandwidth scanner will just notice that mostly your relay offers poor performance. In the worst case, the bandwidth scanner gets lucky and is using the BBR flow that wins, and then all the users get terrible performance from your relay until it's remeasured.

ghost commented 5 years ago

https://metrics.torproject.org/rs.html#details/3BBE9AF4240D169FBA206DCC95D7FDE20C5226C6

TCP - BBR

Configuration
Nickname 
LiveChief
OR Addresses 
206.189.193.90:9001
[2604:a880:400:d1::a6a:1001]:9001
Contact
prajwalkoriala18(at)protonmail(dot)com
Dir Address
206.189.193.90:9030
Exit Addresses
none
Advertised Bandwidth
0 B/s
IPv4 Exit Policy Summary
reject
  1-65535
IPv6 Exit Policy Summary
reject
  1-65535
Exit Policy
reject *:*
Effective Family Members 
Alleged Family Members
none
Properties
Fingerprint
3BBE9AF4240D169FBA206DCC95D7FDE20C5226C6
Uptime
1 day 9 hours 8 minutes and 39 seconds
Flags
 Running    V2Dir    Valid
Additional Flags
 Unmeasured    ReachableIPv6
Host Name
none
Country
 United States (All exits in United States)
AS Number
AS14061
AS Name
DigitalOcean, LLC
First Seen
2019-05-09 03:00:00 (1 day 8 hours 25 minutes and 45 seconds)
Last Restarted
2019-05-09 02:17:06
Consensus Weight
0
Platform
Tor 0.3.5.8 on Linux

NO TCP - BBR

https://metrics.torproject.org/rs.html#search/157.230.6.125

flxn commented 5 years ago

After some reading I came to a similar conclusion as @irl BBR behaves unfair towards other - non BBR - connections. Since a Tor node is connected to hundreds of other nodes, most of which will likely not use BBR, it will restrict the traffic flow, defeating the purpose of a distributed network. See this presentation: https://ripe76.ripe.net/presentations/10-2018-05-15-bbr.pdf

image
irl commented 5 years ago

@LiveChief Even if your relay shows improvements in bandwidth, it's only helping your relay, not the network. This is not a good scientific experiment.

ghost commented 5 years ago

@irl what if we force all tor nodes to use google bbr?

idk how this would be possible but if this was possible, how faster would tor be?

irl commented 5 years ago

@LiveChief my understanding from speaking to Internet engineering researchers is it would pretty quickly kill the Tor network. You should look at tools like Shadow if you wanted to run simulations to try it out.

ghost commented 5 years ago

@LiveChief my understanding from speaking to Internet engineering researchers is it would pretty quickly kill the Tor network. You should look at tools like Shadow if you wanted to run simulations to try it out.

whats Shadow???

Url please

irl commented 5 years ago

@LiveChief http://shadow.github.io/

ghost commented 5 years ago

Thank you good sir.