Tuesday, January 06, 2009

Why BitTorrent is Slow

Every BitTorrent vendor promises you that BitTorrent provides blazingly fast downloads. This is a lie. Weeeell, it's not technically a lie, and it's not an intentional lie, but in practice it's a lie nonetheless.

Here's the theory. BitTorrent works by having many users share pieces of the file among themselves. Seeds have complete copies of the file, and peers don't. By sending different pieces of the file to different peers, the seed reduces its own traffic, since each peer can then share the pieces it has with the peers that don't have them. A tracker facilitates all these exchanges, but it doesn't have a copy of the file at all. Since you can download many pieces from different sources at once, you have the potential of getting the file very quickly even though the upload speed from each individual source is slow.

Here's the practice. For many of the files most likely to be distributed on BitTorrent, there are few seeds, since people who are looking for the file stop their BitTorrent client (or remove the file from their queues) as soon as they've received the full file. So unless you're downloading an insanely popular file with a large number of seeds, you won't realize BitTorrent's potential. The more likely scenario is that all the seeds drop off, leaving only a bunch of peers, each eventually having identical partial copies of the file. And once they drop off, seeds have very little reason (save altruism) to log back on again with that complete file in their queue. Which means that the remaining peers will never receive the complete file at all. This is why BitTorrent clients display that lovely little infinity sign in the ETA column. This is not amazingly fast by anybody's definition. And that's why BitTorrent's supposed advantages are a lie. (Weeell, often a lie.)

So what files are most likely to be distributed on BitTorrent? Large files that are distributed by people who can't afford the server bandwidth to distribute them themselves. Many people apparently feel that they can just distribute the file on BitTorrent and be done with it, trusting that it's going to be "out there". It's a naive and wrong assumption.

How to fix it? BitTorrent has to be used as it's intended to be used. First, peers need to stop removing files from their queues as soon as they're complete. LEAVE IT UP. BitTorrent uploads are slow anyway, so they're not affecting your own machine's performance much. If you want this thing to work you have to be willing to share, and encourage others to do the same for you. And if it's YOUR file and you really want it to be distributed, then leave at least one seed up all the time. Because if you're planning on others to do it for you, you need another plan.

In general, though, if you're looking for a hard-to-find file, and not the latest Linux distribution, plan on a BitTorrent download taking days or weeks. And if you find any server anywhere that's offering the file as an HTTP or FTP download, take it.

And why am I writing this? Because once again I'm on the second week of a BitTorrent download.

UPDATE: here's an apples to apples comparison. I'm currently downloading a Star Trek:Phase II episode... roughly 4GB. On BitTorrent I see 20 active seeds and 16 active peers. There's no way that this shouldn't be a super-fast download, right? Wrong. 26.5 kbps is the fastest download time I've seen yet. Each peer is trickling out data at 1 or 2 kbps. So yeah, it's faster than any single peer, but add them all together and it still sucks. With 26.3% of the file already downloaded, the ETA for the rest is still almost 3 days. Meanwhile, I decided to get it from a server. The same 4GB DVD downloaded in 3 hours.

Second real-world example, and one more reason why BitTorrent is slow. Last night I downloaded a 20MB audio file via BitTorrent. It took over 12 hours, even though there were 20 seeds. Why? Because there were no peers. Why should that make a difference? Because BitTorrent operates on enforced altruism: the more you upload, the faster your download will be. The problem comes when there's no opportunity to upload at all. If you're the only person who currently wants the file you are screwed to the tune of half a day for a file that arrives via HTTP download in a couple of minutes.

BitTorrent is only fast for wildly popular files, but only for narrow definitions of the word "popular". If by "popular" you mean it's actively being sought and downloaded by a large number of people, then MAYBE, but -- as my DVD example shows -- probably not. But if by "popular" you mean it's broadly available, everybody has it, but not many people are currently looking for it... BitTorrent is the worst way to download the file.


Anonymous punkin said...

Yeah, I agree some. The more users are seeding the shared file, the faster the download will be. However, the speed somehow could be limited or restricted by the ISP. A lot of ISPs are against P2P. In the past, I need to unplug the cable modem in order to renew a new IP. Whenever IP starts fresh, I seem to get a better download rate from BitTorrent. At one point, this method wouldn't work because my allotted download/upload speed was limited. I finally found out that they had port scanning to detect p2p activities and then they would take action. It is why my whole speed is limited. When this occurs, my other (normal) downloads are also affected. I wish there are better ways to resolve/improve it. One more thing, changing port doesnn't work but I don't know why sometimes it helps.

August 5, 2009 5:05 PM  
Blogger Dave Leigh said...

True, punkin, there are ISPs that restrict or choke P2P transfers. However, mine's not one of them. When Bittorrent works, it WORKS. But it doesn't really work except for hugely popular files.

To my mind, a good solution would be for the original provider to maintain a seed server that WILL serve packets that aren't available elsewhere regardless of your upload/download ratio. That doesn't fix the speed issue, but at least you wouldn't get the infinity symbol as the ETA.

August 5, 2009 5:31 PM  

Post a Comment

<< Home