[bittorrent] Introductory/endgame algorithms
Olaf van der Spek
olafvdspek at gmail.com
Fri Sep 23 06:00:15 EDT 2005
On 9/23/05, Andreas Aardal Hanssen <bittorrent at andreas.hanssen.name> wrote:
> On Fri, 23 Sep 2005, Olaf van der Spek wrote:
> >On 9/23/05, Andreas Aardal Hanssen <bittorrent at andreas.hanssen.name> wrote:
> >> The warming-up algorithm I've got is that all connections download the
> >> same piece initially, so that the client gets a full piece to share as
> >> soon as possible. This works quite well, and currently they're all asking
> >> for one piece. Do anyone on this list implement a similar algorithm?
> >XBT Client does the same by preferring partially downloaded pieces
> >when less than four (4) pieces have been completed.
> >How do you choose the initial piece though?
> I choose one by random, and always among the ones least seldomly (uh, most
> often) available. I could choose more than one to minimize the risk of
> starvation, but one piece seems to work fine so far ;-).
> >> Also, what do other clients use to determine when to enter the endgame
> >> mode?
> >It depends on how exactly you implement end-mode, but I'd think a good
> >starting point is if all chunks/pieces have already been requested.
> That does sound like a good approach. I have seen serious trashing when
> I've got something like 100+ connections downloading the same piece, but
> solved that problem by randomizing the blocks I download in warmup/endgame
> mode. Tests show that one peer usually gives me everything fairly quickly,
> but when several are giving me the same pieces concurrently, randomness
> ensures that I get one full piece with only about 3-4x overhead. This
> works very well for warming up also.
In end-mode, how much requests do you have pending for a single peer?
More information about the BitTorrent