forum.bittorrent.org

BitTorrent.org community

You are not logged in.

Announcement

Forums are closed. Use the new mailing list! https://groups.google.com/a/bittorrent.com/forum/#!forum/bt-developers

#1 2011-05-14 23:05:44

chinoto
Member

Preventing Sequential Leechers from being a burden

Sequentially leeching pieces can be useful for the user (VLC can work with incomplete files, making it similar to streaming video), but is harmful to the whole swarm (seeders, leechers, and even their self). Here are my suggestions on how to prevent sequential leechers from being a burden to the swarm.

Notes:
When I say leechers in this post, I don't necessarily mean that they aren't uploading.
Position will be [piece number]/[piece total]
$Buffer=clamp(Total*Per,Min,Max) will be used to define a certain amount of bytes, Min might be [piece size]*[connection limit], and Max might be [Max dl speed]*[arbitrary amount of seconds]

Leeches by Order: These all require that there be a less strict version of sequential piece selection. These suggestions don't rely on each other, although #4 was created from a problem I found with #3 (rare pieces becoming common among other peers).
1. Prioritize pieces from left to right in an exponential manner, eg [fraction]^[position] could be inserted into the piece selection algorithm (Edit: didn't realize at first, the last piece's priority will be equal to the fraction, so 0.9984^([position]×1000) is pointless since it equates to 0.2^[position])
2. Prioritize $Buffer bytes at the beginning (especially the first piece) higher than the rest, or exclusively
3. Maintain a piece buffer of $Buffer bytes outside of the contiguous block of pieces (the ones being sequentially downloaded) that are downloaded based on rarity like usual and make sure they are scattered so a new piece buffer doesn't have to be downloaded just because a gap was filled (eg 11102220-00020000, where 1 is sequential pieces and 2 are buffer, becoming 11111110-00020000, thus forcing a download of 3 new buffer pieces before continuing with sequential downloads)
4. Download a new rare piece for every 1MB downloaded (or 5 pieces worth of bytes, whichever is larger)

Leeches by Rarity:
1. Add a preference for pieces near the end in the piece selection algorithm (position of 0-1 translates to linear priority of [fraction] to 1)

Leeches of either kind:
1. Enable these additions only when a majority of the bytes are for media files or when sequential downloading is detected on other peers. (probably only the latter)

Last edited by chinoto (2011-05-15 09:44:46)

Offline

Board footer

Powered by FluxBB