Get Firefox

Firefox 4.0

stopsoftwarepatents.eu petition banner Manifiesto por la liberación de la cultura 
No a la traza privada
Últimos cambios
Últimos Cambios
Vote for Public Maps - Reject INSPIRE! Geocaching
Mi estado actual en Jabber/XMPP: - jabberES - jabber.org

[BitTorrent] Global maximum upload rate for multiple simultaneous torrents

Última Actualización: 11 de Agosto de 2004 - Miércoles

When you launch several simultaneous torrents with the standard and official BitTorrent client, you can control the upload rate per torrent, but no the global upload rate. This situation has several problems:

So I wrote a patch to use a global bandwidth limiter for all torrents. That is, you set the maximum bandwidth to use globally and torrents will compete. You don't need to worry about the precise per torrent allocation. It is automatic.

In brief, if enough demand exists to saturate your indicated global upload rate, for all torrents published, per torrent share will be proportional to the "slice" size. If all clients use the same slice size (in standard BitTorrent, 16384 bytes), all bandwidth shares will be equal.

The number of clients, their bandwidth or their Round Trip Time (RTT) are not factors here.

The patch basically replace the per torrent bandwidth limiter with a global (multithread) version shared (with appropiate locking) by all the current torrents. The only issue is that each torrent must "recheck" the permission to send just before sending, because other torrent could had won the race. In this case, simply schedule another try, hoping better luck next time.

This patch is distributed AS IS (if it erases your harddisk is your fault, not mine ;-) ) using the original BitTorrent MIT License. I haven't removed the original code, so you can patch your client and enable/disable the new code at will.

Currently the patch implements the global maximum upload rate in "btlaunchmany.py" and "btlaunchmanycurses.py". You can add or remove torrents "on the fly", like the original client. If you wish to use this improvement in your our code/client, just do the following in the beginning of your source:

from BitTorrent import Connecter,CurrentRateMeasure
Connecter.Measure_Total=CurrentRateMeasure.Measure_Total(30)

This tiny change will activate my code.


Historia



Firefox 4.0 Python Zope ©2004 jcea@jcea.es