rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.19k stars 415 forks source link

Multithreading per each torrent to drive more scalable performance #1010

Open PulsedMedia-Aleksi opened 4 years ago

PulsedMedia-Aleksi commented 4 years ago

Proposing that rTorrent should have individual thread(s) per running torrent irrelevant of the main thread.

This relates to the other opened issues: Multithreading per tracker (https://github.com/rakshasa/rtorrent/issues/1006), multithreading per peer (https://github.com/rakshasa/rtorrent/issues/1009).

This is for creating more multithreading, and more of the basis. A single thread or multiple threads for the main per torrent "loop". At the very least 1 thread, under which the per tracker and per peer threads sit hiearchically.

This thread(s) should handle the basics for that particular torrent, think of MVC structure, this would be the controller of that and the other threads are of the model section. Quite lightweight thread just making sure everything is moving along nicely, with high performance.

This should be non-blocking towards the higher level (rtorrent main thread).

This is part of our development bounty program: https://wiki.pulsedmedia.com/index.php/Pulsed_Media#Development_Bounty_Program

Bounty for this is currently set at 150€ (300€ as service credit). Not affiliated with rTorrent/libTorrent project nor rakshasa.

PulsedMedia-Aleksi commented 3 years ago

Increasing bounty to 400€ (800€ as service credit)