arvidn / libtorrent

an efficient feature complete C++ bittorrent implementation
http://libtorrent.org
Other
5.1k stars 984 forks source link

libtorrent 2.0.x is much too aggressive in retrying connections to known seeds #7700

Open reardonia opened 5 days ago

reardonia commented 5 days ago

libtorrent version (or branch): noted in 2.0.5 and above

platform/architecture: all

please describe what symptom you see, what you would expect to see instead and how to reproduce it.

Have tested with Deluge and qBittorrent using libtorrent 2.0.5 and above.

(This is coming from interop testing with Transmission 4+)

libtorrent is entirely too aggressive in retrying known seeds. When an LT2 client is a seed, it tries every peer it can find once peer minute. Even when learning that the other peer is a seed (via FastExt "have-all" message BEP-6, or LTEP "upload_only" message BEP-21), it never throttles back or stops contacting peers that are known seeds.

Further, if the torrent is private, and therefore no PEX peer-exchange can occur, when LT2 client is seed, it should stopped contacting known-seeds entirely.

Please consider that this has become signficant enough that the private trackers I work on are considering banning LT2 clients because of the excessive peer-seed traffic generated.

LT1.2 clients do not seem to exhibit this overly aggressive behavior. EDIT: LT1.2.19 also seems to evidence this behavior.

stalkerok commented 4 days ago

the private trackers I work on are considering banning LT2 clients because of the excessive peer-seed traffic generated.

Just wondering, what does a tracker have to do with what two peers are doing under the blanket? In what way does the tracker suffer from this? Total domination of pompous private tracker admins over their users is always disastrous for the tracker.

reardonia commented 4 days ago

the private trackers I work on are considering banning LT2 clients because of the excessive peer-seed traffic generated.

Just wondering, what does a tracker have to do with what two peers are doing under the blanket? In what way does the tracker suffer from this? Total domination of pompous private tracker admins over their users is always disastrous for the tracker.

Hey, I'll take the feedback that I came across as petulant, but really this issue was raised by our users, not admins. Our main tracker focuses on and rewards long-terms seeds, and this becomes very problematic when the background chatter among seeds is too large. For comparison, chatters amongst Transmission-based seeds is 1/200th (measured at packet level) of chatter from LT seeds. That is an enormous delta and becomes prohibitive when seeds are hosting 1000's to 10000's torrents.

Seeker2 commented 3 days ago

The seeds retrying seeds problem is far worse than first appears, if using uTP: https://github.com/arvidn/libtorrent/issues/3542#issuecomment-1257038658

It can flood out other connections for seeds...

...even appearing to cause massive file losses and/or hard drive damage for other BitTorrent clients on basically every shared torrent they have in common with libtorrent-based clients: "Disconnect: Peer error: The system cannot find the file specified."

That link isn't the first known instance of seeds-retrying-seeds every minute by libtorrent clients -- that has been known for years.