ikatson / rqbit

A bittorrent client in Rust
Other
607 stars 56 forks source link

limit parallel checking of torrents #139

Open milahu opened 2 weeks ago

milahu commented 2 weeks ago

currently there seems to be no limit, all torrents are checked in parallel

cpu load is about 25% when checking 20 torrents in parallel so this is just slow, not causing too much cpu load

libtorrent has the setting hashing_threads

aka: limit number of checking threads

ikatson commented 2 weeks ago

There's probably a limit - the number of tokio IO worker threads. It's used for other things too though like writing to disk. It's configurable from command line too: https://github.com/ikatson/rqbit/blob/main/crates/rqbit/src/main.rs#L105

Does that help?