mapa17 / Eruliaf

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

TFT Allocation algorithm using too few TFT Slots #54

Closed mapa17 closed 12 years ago

mapa17 commented 12 years ago

The modified PeerC1 client has a bug in the TFT Allocation algorithm that makes it allocate only very few TFT Slots (1/6 o 2/6).

mapa17 commented 12 years ago

One bug in the TFT Allocation algorithm was that the rate list was not sorted in reverse (making the cooperating peers less attractive ..)

Besides that, no further peer would be added if the upload bandwidth would exceed the maximum tft upload bandwidth. The algorithm was adapted to chose another tft slot, but limit the upload bandwidth of this connection to the remaining upload bandwidth.

mapa17 commented 12 years ago

Something is wrong here. Strange peers are selected for TFT Slots, and not enough peers are selected.

mapa17 commented 12 years ago

This was a stupid mistake. As described earlier the rating list was changed to be sorted in reverse. The problem was now that elements of the list where poped out of the list from the back. I have adapted the algorithm to sort the rating list in reverse and pop the the first element. Like this it works the same as in the Peer.runTFT() implementation.