qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
25.98k stars 3.83k forks source link

Bandwidth priorities for torrents #566

Open YamashitaRen opened 11 years ago

YamashitaRen commented 11 years ago

As stated here : http://www.rasterbar.com/products/libtorrent/manual.html There is a set_priority function which allow a fine tweaking of torrent's bandwidth priority. It is very useful when you have a low bandwidth and want to seed particular torrents (low seeded torrents or your own torrents for example). I would be very happy to see this in qbittorrent.

Here is the description from the libtorrent API Documentation : void set_priority(int prio) const;

This sets the bandwidth priority of this torrent. The priority of a torrent determines how much bandwidth its peers are assigned when distributing upload and download rate quotas. A high number gives more bandwidth. The priority must be within the range [0, 255].

The default priority is 0, which is the lowest priority.

To query the priority of a torrent, use the torrent_handle::status() call.

Torrents with higher priority will not nececcarily get as much bandwidth as they can consume, even if there's is more quota. Other peers will still be weighed in when bandwidth is being distributed. With other words, bandwidth is not distributed strictly in order of priority, but the priority is used as a weight.

Peers whose Torrent has a higher priority will take precedence when distributing unchoke slots. This is a strict prioritization where every interested peer on a high priority torrent will be unchoked before any other, lower priority, torrents have any peers unchoked.

thalieht commented 2 years ago

set_priority was deprecated long ago. Now it can be done via peer_class_info

uxmy commented 2 years ago

The lack of bandwidth priority is the only reason why i can't use qBittorrent as my main torrent client. Some clients implemented this feature years ago. With qBittorrent, public torrents get all my upload bandwidth, while torrents from private trackers get almost nothing. Probably, most of qBittorrent users who are members of some private trackers are limiting upload speed of public torrents, just to make sure that private torrents get enough bandwidth. Since qBittorrent is popular, and public torrents represent >90% of active torrents, this problem has a negative effect on BitTorrent efficiency by making torrents slow.