[bittorrent] Advertising Piecesize + Request Queue (= outstanding 0x07 messages)

Adrian Ulrich torrent at blinkenlights.ch
Tue Nov 20 16:33:18 EST 2007


Does anyone know if there is an extension to get the maximal supported piecesize / queue-length from a connected peer?
If no such extension exists: how about creating a new eproto message? :-)


A long time ago there was a discussion about dynamic piecesize at

I am a supporter of 'View #1': Hardcoding values for PIECESIZE and QUEUELENGTH doesn't make much sense.
The current values work well with todays equipment.. but how long will this last?


Clients could exchange/advertise information about max. piecesize / queuelength:

After completing the eproto handshake, client A sends this information to client B:

 xy_foobar = {
               piecesize   => 98304,
               queuelength => 12

-> B does now know that he can use 96kb blocks and that A will accept up to 12 requests.
   If B chooses to continue using 16 kb blocks: Fine, 'A' wouldn't care about it.
   But if B would like to use larger blocks (latency issues, etc) he will know how
   big they can be.

-> If A thinks that 96kb blocks aren't a good idea anymore it could just re-send the message to B.

Implementing the 'advertising-part' should be trivial.

I’m awaiting your feedback / flames ;-)


More information about the BitTorrent mailing list