Download rarer pieces at a higher priority

Discuss suggestions and ideas for the forums, site, software.
Post Reply
Lassik

Download rarer pieces at a higher priority

Post by Lassik »

I apologize if this is the way things already work but it doesn't seem like it is.

I see the option to download sequentially but i'd like to see an option to put a higher priority on downloading pieces that are held by fewer people within the swarm. I think this could help to keep torrents alive longer and reduce the odds of a torrent stalling.

By having a higher priority placed on pieces that fewer peers have it can help torrents stay alive in the event that those few people who have those pieces drop out of the swarm. There are so many times when I see a torrent that has a health over 100% but then as time goes by, people start to drop out the torrent health drops to a point where it's impossible to complete it.

Say for example there is 1 person who is seeding the full file. Then you have 20 peers. If a portion of those peers are focusing on the least held pieces then there's a better chance that if the main seed drops out, all the remaining peers could have enough pieces to create the whole file.

Now, for all i know things could already work this way and if so then I apologize for my ignorance. It just seemed like pieces were just downloaded at random with no preference to rarity.
KitKat

Re: Download rarer pieces at a higher priority

Post by KitKat »

[quote="Lassik"]
Now, for all i know things could already work this way and if so then I apologize for my ignorance. It just seemed like pieces were just downloaded at random with no preference to rarity.
[/quote]

Unless the user sets a manual priority i believe libtorrent attempts to download as you've described/asked for already.
This of course assumes you're connected to people who are actually seeding and holding rare pieces, if you're connected to fast peers and they have no rare pieces you will get those pieces first, simply because they are available.
User avatar
Nemo
Administrator
Administrator
Posts: 1744
Joined: Sat Jul 24, 2010 6:24 pm

Re: Download rarer pieces at a higher priority

Post by Nemo »

The piece picker is a central component in a bittorrent implementation. The piece picker in libtorrent is optimized for quickly finding the rarest pieces. It keeps a list of all available pieces sorted by rarity, and pieces with the same rarity, shuffled. The rarest first mode is the dominant piece picker mode. Other modes are supported as well, and used by peers in specific situations.

The piece picker allows to combine the availability of a piece with a priority. Together they determine the sort order of the piece list. Pieces with priority 0 will never be picked, which is used for the selective download feature.

In order to have as few partially finished pieces as possible, peers have an affinity towards picking blocks from the same pieces as other peers in the same speed category. The speed category is a coarse categorization of peers based on their download rate. This makes slow peers pick blocks from the same piece, and fast peers pick from the same piece, and hence decreasing the likelihood of slow peers blocking the completion of pieces.

The piece picker can also be set to download pieces in sequential order.
Lassik

Re: Download rarer pieces at a higher priority

Post by Lassik »

Nemo wrote:
The piece picker is a central component in a bittorrent implementation. The piece picker in libtorrent is optimized for quickly finding the rarest pieces. It keeps a list of all available pieces sorted by rarity, and pieces with the same rarity, shuffled. The rarest first mode is the dominant piece picker mode. Other modes are supported as well, and used by peers in specific situations.

The piece picker allows to combine the availability of a piece with a priority. Together they determine the sort order of the piece list. Pieces with priority 0 will never be picked, which is used for the selective download feature.

In order to have as few partially finished pieces as possible, peers have an affinity towards picking blocks from the same pieces as other peers in the same speed category. The speed category is a coarse categorization of peers based on their download rate. This makes slow peers pick blocks from the same piece, and fast peers pick from the same piece, and hence decreasing the likelihood of slow peers blocking the completion of pieces.

The piece picker can also be set to download pieces in sequential order.
Awesome. Thank you for the information. I wasn't aware that this already worked this way. Good to know that it does. I apologize for the silly request seeing as how it already exists but I do appreciate the enlightenment.

Thank you!
Post Reply