mapa17 / Eruliaf

A BitTorrent like overlay peer simulator
GNU General Public License v3.0
1 stars 0 forks source link

Piece Size and the problems that follow #43

Closed mapa17 closed 12 years ago

mapa17 commented 12 years ago

I have changed the scenario to a more realistic setup, where the peers try to download a file of 1 GB with upload between 1-5Mb and download between 10-100Mb.

Put the problem is now the Piece Size. First I dint change it from the old fixed value of 500 Pieces per file, so the piece size was 2MB and was so big that a peer would need more than 30 ticks to download a single piece. This didnt work out well.

Than fixed a bug which made the seeder not change the peers in the OU slots, but now i have the strange situation that the seeder would like to upload in a OU slots, but the chosen nodes have no interest. (Because their queue list is full enough to not call pieceSelection() , and their piece Queue has not a single piece offered by the Seeder) So the Seeder would either have to drop SuperSeeding and seed what the peers need, or select peers that have interest ( which would change the OU algorithm and would probably select the previous peers), or the peers have to call pieceSelection() more oftenly to be more up to date with the real distribution of pieces.

The rarestFirst algorithm will quarantine in combination with SuperSeeding that the seeder is always of interest to a peer. ( because only the seeder has some pieces )

So how and when should peers update the pieceQueue list?

mapa17 commented 12 years ago

I have adapted the code so that pieceSelection() is called every 5 ticks or if the piece Queue is empty. A refresh rate of five ticks should be ok. In the worst case we are not interested in OU data from other peer for some ticks.