Upload speed

Study to upload bandwidth estimation for Tribler.

Azureus auto bandwidth plugin

eMule upload speed sense

BitTornado Ping implementation

Our current BitTornado code has already an upload limit implementation in RateLimiter.py. It measures a round-trip-time between the sending of an UNCHOKE message and the first REQUEST of the other peer. If it has gathered around 8 of these measurements and a certain amount of them exceeds a certain constant, the upload rate is reduced. When after some time, the majority of the measurements is lower than the constant, upload speed is increased again.

For this mechanism to work, one has to configure the upload speed limit of a torrent with the value -1.

Our own algorithm without pings

Measure mode and limit mode

The idea is to switch between measure mode and limit mode. In measure mode, no limits are imposed on the upload and the upload bandwidth is measured during a period. In limit mode, the upload bandwidth is limited to a certain value, based on earlier measure periods.

Dynamic length of measure periods and limit periods

Based on the difference between the measured upload bandwidth and a longer range average/maximum of all measured periods, the length of the limit mode and measure mode are changed. Consequently, if a measurement is done that shows an upload measurement that differs much from earlier measurements, the stability of the system is assumed to be changing and more measurements are done.

Change limit when upload bandwidth is less than limit
When the system is in limit mode and for a certain period the limit is not met, we assume that another program has just started using more upload bandwidth. This is than interpreted as a implicit measure period and the upload limit is changed as such. More measurements will be done after this happens.