BitTorrent's been around for some time now, and the chances are that you've tried using it to download large files.
The big attraction of the protocol is that it spreads the load of any file transfer across a swarm of computers that are both uploading and downloading.
In theory, this irons out any kinks and bottlenecks because no single server is being hit simultaneously from many directions.
The problem that most people who simply dabble with torrents find is that despite reports of this being a lightning-fast method of downloading files, the reality proves to be anything but.
Download speeds are directly related to the number of computers actively seeding the file plus your own ratio of uploading to downloading, and numerous ISPs deliberately shape traffic to reduce the amount of peer-to-peer interaction on their networks. If your BitTorrent program isn't configured optimally or your router's blocking the wrong port, what should be a torrent could easily resemble a mere trickle.
You can't control the network conditions or the number of seeds available, and if you're locked into a contract with your ISP, you probably won't be able to move to an ISP with a different traffic-shaping policy. However, you can maximise the potential of your BitTorrent client.
Choose a client
The first step is to choose the right client. BitTorrent is merely the protocol used to share the files; client programs vary considerably. All are capable of connecting with a swarm and downloading torrents, but the footprint and ability to control connection speeds and other useful configurations can vary for each program.
uTorrent is a Windows client with a very small footprint and much room for configuration, so it's one of the most popular choices. Vuse – formerly Azureus – is a Java application and will run on numerous platforms. It's not as nippy as uTorrent, but it includes a couple of tricks and features that the smaller program doesn't. We'll concentrate on setting up uTorrent here, as it's the logical choice for most users.
BitTorrent concentrates on encouraging users to share their bandwidth. To do this, it limits the download speed for those who aren't sharing or those who don't continue seeding after download to a 1:1 upload/ download ratio. This means that you need to configure your client and router to enable uploads to go ahead at a reasonable level.
Look at the stats
You also need to pay attention to the statistics published for the torrent files that you download. Sites listing torrents often supply details for the file's number of peers, seeders and leechers, although these aren't in real-time and are generally out of date.
However, these statistics do give an indication of how popular the download is, which in turn will give you some idea of transfer speeds. When downloading a file using a BitTorrent client, you'll get an accurate idea of how many seeds, leechers and peers you're actively connected to.
It's important to pay attention to the number of seeders, because that figure will directly affect your download speed. A torrent that's being seeded by just one computer that's uploading at 5KB/s will download at a maximum of that upload speed. If there are a number of active leechers who have been downloading the file for some time, you could benefit from them re-seeding it as they download because it will improve the download speed. However, each leeching computer has an incomplete version of the file.
Unless they become seeders when the download is complete, you could still be limited by the initial seeder's upload capability. Pick torrent files that have a healthy number of seeders if you want a good download speed.
Peers join and leave a swarm all the time. This is due to users closing their client programs, turning off their computers or pausing downloads. For a popular download this has little impact, but when peers are few and far between, it can have a dramatic effect on the transfer speed.
For many, it's a case of taking advantage of the times of day that their ISPs don't observe and meter data transfer. Seeders may also leave a swarm if they need to free up bandwidth. You can take advantage of times when your connection is less likely to be in use by scheduling the download.
In uTorrent, you can get to the scheduler by choosing 'Options | Preferences | Scheduler'. Tick the box marked 'Enable Scheduler' and use the grid to set the times when you want your connection to be active. By default it's set to full speed at all times.
Each block in the grid represents one hour in each weekday. To change its setting, click the block. Each click cycles it through four settings: Full Speed, Limited Speed, Turn Off and Seeding Only. If you can afford to use some bandwidth during times when you want the scheduler to protect your connection, set the hour to Limited and enter the maximum upload and download speeds that you want to permit in the scheduler's settings.
Scheduling is one way to deal with limitations enforced by your ISP. Some providers employ traffic shaping to limit the use of peer-to-peer apps. ISPs should have a transparent shaping policy that gives you a clear idea of exactly what triggers throttling and when you can expect it. However, many users find that traffic is limited at the ISP level when there isn't a clearly published shaping policy.
Avoid traffic shaping
If you come up against traffic shaping, there are several techniques that you can use to overcome it – although none is more effective than switching to an ISP that doesn't throttle.
Methods include switching the port that your BitTorrent client uses, encrypting BitTorrent transfers, modifying the way that the BitTorrent protocol behaves, reducing the quantity of one-way traffic or using tunnelling. ISPs are generally wise to these tricks and many have developed ways to detect them, but they can still work in some circumstances.
You can change the port that's used for uploading data in the Preferences menu of your BitTorrent client. The default port used for BitTorrent is 6,881, although different programs do vary. Some client programs can assign a random port number; this is worth doing even if you're not looking to overcome traffic shaping as it makes it more difficult for hackers to take advantage of your open port.
You will need to forward the relevant port if you use a NAT router so that peers can detect and upload data from you. Most clients include a testing feature so that you can see if your upload port is being blocked or not.
For help setting up port forwarding, visit Port Forward. This site includes instructions for setting up port forwarding on most popular routers and firewalls, with support for many common programs included too.
Encrypt your traffic
Encryption makes it difficult to monitor the content of the traffic passing to and from a BitTorrent program. This makes the use of BitTorrent hard for ISPs to detect, although the pattern of usage can indicate likely torrent use.
It's easy to enable encryption in uTorrent. Choose 'Options | Preferences | BitTorrent' and change the Outgoing Protocol Encryption setting to Enabled or Forced. Forced is a better option for ensuring encryption as it refuses peers that don't use it, making it even harder for ISPs to detect torrent use. Doing so will reduce download speed if many of the connected peers aren't using encryption, however.
Ticking the 'Allow legacy incoming connections' checkbox improves compatibility with older BitTorrent clients, but it can let unencrypted traffic pass through, which may leave you detectable to traffic shapers.
The BitTorrent protocol has a distinctive handshake, and ISPs have learned to detect this. Often they attempt to squeeze seeders, because these are particularly detectable.
However, it's possible to enable a feature called Lazy Bitfield in uTorrent that disguises seeders as leeching peers. To do so, choose 'Options | Preferences | Advanced' and scroll to the setting 'peer.lazy_bitield'. Select it and choose 'True', then 'OK' to confirm.
Another way to disguise BitTorrent use is to limit the amount of one-way transfers. Once you've downloaded a file via BitTorrent, you're encouraged to leave it to seed until the ratio of download to upload reaches 1:1. This is to keep the torrent active. However, ISPs are keen to control seeders because they generate one-way outbound traffic that can be difficult for ISPs to handle.
Limit download speed
The solution is to limit your download speed to the same rate as your upload speed. This means that the download takes longer to complete, but you're closer to achieving a 1:1 ratio as soon as the download is complete, meaning that you don't end up with lots of one-way traffic. It may seem counter-intuitive to reduce the download speed to a quarter of what it could be, but if this means that you avoid a throttling penalty then it may be worthwhile.
The final method of avoiding traffic shaping involves using tunnelling to hide your BitTorrent traffic completely. This involves using a VPN or alternatively a cooperative encrypted network like Tor, which can now support P2P traffic. Vuse provides support for Tor and I2P within the client itself. To use other clients, you would need to follow the instructions provided by the Tor or I2P communities.
We don't recommend using these anonymising networks, however. They were developed to support freedom of speech. They're not well suited to peer-to-peer traffic and can be very slow. Using them for file exchange arguably goes against the spirit of the cooperatives anyway. The time and effort you would spend getting a client working with one is unlikely to be repaid with decent download speeds.
First published in PC Plus, Issue 277
Sign up for the free weekly TechRadar newsletter
Get tech news delivered straight to your inbox. Register for the free TechRadar newsletter and stay on top of the week's biggest stories and product releases. Sign up at http://www.techradar.com/register