bittorrentutorrent

How exactly is availability of a torrent calculated in uTorrent


uTorrent has an availability indicator that shows something like how many of the peers you are connected to have how much of the torrent. If it is less than 1, all the peers you are connected to combined do not have the entire torrent. However for a 'healthy' torrent this number is often larger than 1, showing that even if some seeds disconnect the data stream will not be totally disrupted.

How exactly is the availability index calculated?


Solution

  • When a BitTorrent client calculates the availability of a torrent,
    it first, for every piece, sums up how many different peers that piece can be downloaded from.

    Then it finds the lowest sum. That sum is the integer part of the Availability.

    After that it checks how many pieces that has that lowest sum.
    The fractional part of the Availability is then calculated as:

    (Nr_of_Pieces_in_torrent - Nr_of_Pieces_with_lowest_sum) / Nr_of_Pieces_in_torrent
    

    A Seed is a peer that has all the pieces in the torrent. Even if there is no seed in the swarm,
    the availability can exceed 1 as long as every individual piece in the torrent is available from at least one peer.

    (Answer from a similar question on Superuser.)