Opened 13 years ago

Closed 13 years ago

#2609 closed Enhancement (fixed)

Leave 5% of connection slots for incoming connections

Reported by: jch Owned by: charles
Priority: Low Milestone: 2.00
Component: libtransmission Version: 1.76
Severity: Minor Keywords:


Currently, we actively connect to peers as long as we haven't reached the torrents maxPeerCount. Leave 5% of that value for incoming connections, which will make firewalled peers somewhat more likely to get a peer.

Note the rounding: this has no effect when maxPeerCount is less than 11.


Attachments (1)

0001-Leave-5-of-connection-slots-for-incoming-connections.patch (1.2 KB) - added by jch 13 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 13 years ago by charles

jch: that patch is straightforward enough, but what's the rationale for it?

comment:2 Changed 13 years ago by jch

In a typical swarm, there's a number of reachable peers and an unpleasantly large number of unreachable peers. The reachable peers are overloaded, while the unreachable ones have spare throughput (since they can only speak to the overloaded reachable peers).

The idea of this patch is that we want to encourage speaking to unreachable peers, in the hope of spreading the load more evenly, or, if you prefer, to use as much as possible the spare throughput of unreachable peers.

Running a peer that's unreachable over IPv4 but reachable over IPv6, I find that with this patch, I quickly get a number of incoming connections from fast IPv6 peers that probably discovered me through PEX (possibly due to #2502). Without it, I quickly aquire 60 IPv4 peers, and I cannot accept connections from the fast IPv6 peers I'm reachable for.

For what it's worth, according to 8472, Azureus does something similar (although it is my understanding that they make more efforts to determine the number of slots to let free -- overkill in my opinion).

I suggest applying this patch to the trunk just after 1.80 is branched, and seeing how it goes.

--Juliusz (who is carefully avoiding the term bandwidth, since he doesn't fully understand Shannon's law)

comment:3 Changed 13 years ago by charles

  • Milestone changed from None Set to Sometime

comment:4 Changed 13 years ago by charles

  • Milestone changed from Sometime to 2.00

comment:5 Changed 13 years ago by charles

  • Component changed from Transmission to libtransmission
  • Owner set to charles

comment:6 Changed 13 years ago by charles

  • Resolution set to fixed
  • Status changed from new to closed

Implemented in trunk for 2.00 by r10544

Note: See TracTickets for help on using tickets.