0. Getting the code
tl;dr — give me the code already.
Edit (2011-02-18): the µTP code is now in the Transmission trunk, and the instructions below are no longer current.
Install git (git-core on Debian and Ubuntu) if you don't have it already, and then do
Code: Select all
git clone -b utp git://github.com/jech/transmission.git cd transmission/ ./autogen.sh make
1. Low-Priority traffic
BitTorrent is a rather greedy protocol: we're all familiar with how a BitTorrent peer will happily gobble all the bandwidth that's available, leaving none for web browsing or online gaming. The standard solution is to artificially limit the throughput of a BitTorrent peer, typically to 80% or so of your line's available throughput. Doing this is not ideal: on the one hand, we're using just 80% of the available throughput, wasting the rest; on the other hand, the throughput used by BitTorrent remains constant, whle we'd like it to automatically drop when somebody starts browsing the web or playing online games.
The proper solution is to send the BitTorrent traffic at lower priority than the regular traffic, so that it automatically yields to normal priority traffic. Such low-priority, background traffic is sometimes called less than best-effort (LTBE) traffic, since it has lower priority than the normal "best-effort" traffic.
The Micro Transport Protocol (µTP) is BitTorrent, Inc.'s LTBE (low-priority traffic) solution. µTP consists of two parts: a low-priority, low-delay congestion controller called LEDBAT (due to Stanislav Shalunov), and a framing scheme called µTP.
LEDBAT A congestion controller is the piece of code that decides how fast to send packets without overwhelming the network. LEDBAT, the congestion controller used by µTP, is a carefully designed to not interfere with normal "best-effort" traffic, such as gaming and web browsing.
µTP LEDBAT-controlled BitTorrent data is not sent over TCP, as normal BitTorrent data is; instead, the engineers at BitTorrent, Inc. have chosen to put it in UDP packets in a framing that is almost, but not quite, completely unlike TCP. Some people, including myself, have taken a somewhat dim view of the µTP framing.
3. µTP in Transmission
Transmission implements µTP by using the libutp library, written by Greg Hazel and Arvid Norberg, and published as Open Source by BitTorrent, Inc.
The code is currently very preliminary, but usable. Outgoing connexions still need work, as does bandwidth control. And of course we're not going to include our µTP code into Transmission until it has received a lot of testing.
More technical discussion of the µTP code should happen under ticket #2338.
4. Moving LEDBAT forwards
Embedding BitTorrent within µTP allows easy deployment with no modifications to operating system kernels, and serves as a useful proof of concept. In the longer term, however, LTBE is better achieved by putting the LTBE congestion controller in the kernel, to be used with TCP. This has a number of advantages, including:
- a TCP controller is available to all the programs on the system, not just the BitTorrent implementation; for example, you'd probably want to download OS updates over LTBE;
- a TCP controller could be used with an unaware peer — you could send LTBE data to a peer that only speaks normal TCP.
LTBE is necessary if we want to do interesting things over the Internet, not just web browsing and e-mail. By investing significant resources into research on LEDBAT, BitTorrent, Inc., have shown that they understand that.
LEDBAT is too important to remain tied to µTP; I'd like to see people push LEDBAT further, and get it to work together with TCP on Windows and Linux.
--jch, Juliusz Chroboczek