kendanniswara / LibtorrentWiBed

GNU General Public License v2.0
0 stars 0 forks source link

Peers don't seed a file on completition #13

Closed zavalyshyn closed 9 years ago

zavalyshyn commented 9 years ago

Fucking peers just disappear when they are done with downloading. That's weird.

zavalyshyn commented 9 years ago

Same behavior appears with a default rtorrent client (no modifications). After completing download of a file, peers just stop all the connections with leachers and stale.

Why does it happen I don't know. Googling

kendanniswara commented 9 years ago

The problem is the nature of the program itself. When the download is 'finished', rtorrent (not libtorrent) will stop the torrent first to do hash check. After the process is finished, the torrent is started again as a seeder.

This stop and resume process is the root of all evil

kendanniswara commented 9 years ago

this commit https://github.com/Telolets/LibtorrentWiBed/commit/0beaf98b87f1382d827d0a33c5347a9ebf6a5dfc apparently refresh the tracker much faster, better removal of idle peers. Good for our case where higher tracker load is better than the nodes do too much idling state.

The following commit update the tracker timer to be more faster. but this commit is the most helpful part

emmdim commented 9 years ago

Have in mind that we want to minimize the interaction with the tracker. Idieally we should connect to him only in the beggining and the end of the process :-P

kendanniswara commented 9 years ago

In my opinion this is what we can do with implementation with tracker. We don't send the whole file but there is a connection to the tracker to update the situation. This is important to follow the rtorrent nature works.

In the other side, implementation without tracker will eliminate all tracker connection. But need more work in the beginning to collect all IP + port info for each client and then distributed the information in one time. More deep discussion for this one i think it's better to do it in the related 'without tracker' issues

emmdim commented 9 years ago

For the first part I agree, nevertheless still the communication to the server should not be very often. What is the period you have chosen?

For the second part my answer is here: https://github.com/Telolets/LibtorrentWiBed/issues/9#issuecomment-65515585

kendanniswara commented 9 years ago

Currently it's around 120 second. This is will be the worst case idling time of a node

I want to change it into 30 second if it's permitted by the tracker. (not considered as abuse)