[bittorrent] Piece downloading strategy

Dennis Holmes dholmes at rahul.net
Sun Aug 5 20:02:18 EDT 2007


Look what Alan McGovern wrote:
> I want to reword the piece download strategy section to highlight the
> following:
> 
> 1) A linear strategy is not good. Downloading piece 1 first, piece 2 second
> etc is bad.
> 2) A completely random strategy is far superior to this.
> 3) A pseudo-random rarest-first strategy is 'best'. When calculating the
> rarest pieces, you should endevour to make sure that your algorithm won't
> choose the same 'rarest' piece at the same time as other clients would -
> this is already stated.
> 
> Anything else that should be added/mentioned? Anyone want to give a
> psuedo-code algorithm?

These statements need to be qualified and/or justified (a reason
"why" is needed).  A linear strategy is reasonable if the client's
goal is to stream the content to the user while downloading.  Strategy
1 won't overload seeders any more than strategy 2 (as long as early
peers aren't started around the same time) but produces poor
distribution of the later pieces.  The statements assume that the
client's goal is to maintain the widest availability of pieces, but
it should be stated and explained why this is good/necessary and
how each strategy supports or hinders this goal.

It also might be worth pointing out the assumption that all peers
share a similar goal and strategy.  The problems with the first two
strategies happen largely when most peers are using that strategy,
not when one uses it as an exception.  This could be tied in with
the statement in the choking algorithm section that new algorithms
need to work well when that algorithm is used by all peers in the
swarm.

I think that the algorithm description in the document's current
second paragraph is fine, and would continue to be so in conjunction
with your proposed changes (replacing the first paragraph/sentence).
Being more specific than this is likely to introduce dependencies
on a particular client's implementation details.

Please take these comments constructively as intended; I agree with
your assessment and direction of the section and the changes.

+----------------+-------------------+------------------------------------+
| Dennis Holmes  | dholmes at rahul.net |  "We demand rigidly defined        |
| San Jose, CA   +-------------------+   areas of doubt and uncertainty!" |
+------=>{ Meanwhile, as Ford said: "Where are my potato chips?" }<=------+



More information about the BitTorrent mailing list