Skip to content

Add torrent priorities #18

@dominikh

Description

@dominikh

We have P available peer connections and t active torrents. By default, each torrent will be able to use P/t connections (but may use more if other torrents use fewer.) However, we may want to prioritize some torrents over others. There are two ways to do this, and we probably want both of them:

  1. Give individual torrents a bigger share of connections. Each torrent will have a factor f in [0, ∞] defaulting to 1. The minimum peers per individual torrent will then be f / ∑(all factors) · P. The user could have a set of such factors, like 1, 5, 10, ... and give them names such as "normal", "medium", "high"... Ultimately, the choice of factors determines just how starved a torrent can be in relation to other torrents.
  2. Assign priority groups to torrents, and allocate connections to groups in order of priority, allowing more important groups to use up all connections, leaving none for lower priority groups. Within a group, factors would apply, but only consider torrents within the group.

The same approaches can be extended to upload/download slots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions