Bile Duct

FatDave's Guide to BitTorrent

So, lately I've been turning a lot of friends on to the wonders of BitTorrent. I've sent long educational emails to a couple of them, so rather than continue to do that I've decided to put this page together. Sure, there are other BitTorrent guides out there, but none of them are written the FatDave way (i.e. lots of parentheses, colons, dirty words, mispellings, and music references).

And that's why I call this page FatDave's Guide to BitTorrent.

So What is This BitTorrent Thing Anyway?

I thought you'd never ask.

BitTorrent is not a program, it is merely a protocol (much like HTTP is a protocol). Specifically, it is a peer-to-peer protocol for exchanging files. Peer to peer simply means that users of the protocol share files with one another off of their own computers rather than a central server someplace. It was created by Bram Cohen in 2002. Just by chance he crossed a diamond with a pearl, then he turned it on the world.

While there are many peer-to-peer (henceforth referred to as P2P) programs and networks on the internets, I feel that BitTorrent has a couple advantages over them. They are:

BitTorrent is Somewhat More Private

Most of the other networks employ a feature where you can search for a file, and once you find somebody sharing it, you can then see a list of what other files that person is sharing. While this can be handy if you come across a person who you feel has good taste in music, software, pornography, etc., it is also handy for The Man to see who's sharing buttloads of copyrighted material. Not that I suggest anybody ever share copyrighted material on P2P networks, heavens no, but it's harder for people to snoop via BitTorrent. The only people who can tell that you're sharing a file are other people who are sharing that same file.

BitTorrent Works Better

At least that's been my experience. Your mileage may vary.

What Can I Find With BitTorrent?

You name it. Mostly music, video files and software. Need some live Grateful Dead? It's out there, and freely exchangeable. Missed an episode of Arrested Development? Somebody's sharing it (though that might not be legal, strictly speaking). Want porn? You'll find it. In abundance. Lost your copy of the Windows XP CD? Bet you can find it, and as long as you use your own license number, there should be nothing wrong with getting a copy of the CD however you like (even if Microsoft doesn't particularly like it).

How it Works

A Brief Note on Terminology

It wouldn't be an internet protocol without some confusing terminology, and unfortunately the word "torrent" can sometimes have multiple meanings. A torrent is simply a file or a set of files being shared by users, as in "yes honey, I'll neuter the dog as soon as this torrent finishes downloading." However, a big part of the process involves small files that end with .torrent. For example, you may have a file called "Goat-Fucking Albino Midget Sluts.torrent", you sick bastard.

So anyway, if I'm referring to one of those small files, I will refer to it as ".torrent", otherwise the word "torrent" just means the actual files you're really trying to download. It's all in the dot, see....

So now that that's out of the way, the BitTorrent process can be thought of in terms of a handful of components. They are:

The Client

The client is the program you use to connect to other BitTorrent users and share files with them. There are many to choose from (my favorite is Azureus) but they are all interoperable. You can share files with anyone using any BitTorrent client as long as it follows the protocol, and as far as I know, they all do. They are also all free, though some may be freer than others.

The Tracker

No, that's not an ABC summer replacement show starring Chuck Norris as a white bounty hunter who was raised by native Americans after his parents were brutally slain by a corrupt sheriff.

A BitTorrent tracker is a server somewhere on the internets that coordinates the exchange of data between clients. When you start or stop sharing a torrent, the client (the program running on your PC, see above) announces this to the tracker so it can maintain a list of everyone sharing a particular torrent. The client periodically reconnects to the tracker to get the list of all other clients sharing the torrent. The client also reports to the tracker how much of the torrent it has downloaded and how much it has uploaded.

A good (ok, workable) analogy is that the tracker is the host of a party, and each client is a guest. The guests mostly talk amongst themselves, but check in with the host periodically. The host is busy and doesn't have much to say, but he will always keep you informed if someone has come or left. "Steve said to tell you goodbye. Oh, and have you met Mark?" OK, so either my analogy just fell apart or it's a very strange party.

Some trackers are simple things that allow anyone to announce a new torrent and allow anyone to connect to a torrent. Many are much more in depth and are tied to web pages that require login and track the user's ratio of data downloaded to data uploaded. This ratio is usually enforced, and if your downloads drastically exceed your uploads, you're cut off from downloading. These fancy trackers also usually have a web interface for viewing the torrents currently being shared, the number of users sharing them, and the .torrent files (see below) themselves for download.

The .torrent File

To begin sharing any torrent, the first thing you need is a .torrent file. It is your invitation to the crazy-ass party I just talked about. These are small files, typically under 100K bytes in size. The .torrent file contains the following important information:

The Tracker Announce URL

This is the most important thing your client software needs to know to share a torrent. It is simply an HTTP URL that points to the tracker for a particular torrent. For example, the announce URL might be something along the lines of "http://some.server.com/tracker/announce.php". This is where your client will go to say "Hey, I want to get in on this torrent!"

It's the address of that weird party.

The Torrent's SHA1 Hash

This is just a string of numbers computed from the files in the torrent. It is used by the tracker and the clients to tell torrents from one another. That's about all you need to know about it. Actually, you don't even need to know that, but I'm describing what's in a .torrent file, so I feel I need to mention it, 'cuz it's in there and it's important that it is.

SHA1 is the Secure Hash Algorithm. You run a large amount of data through the algorithm and get a short string of bytes back. This string has an extremely high probability of being unique. This makes it a good way to compare several files without comparing the whole thing. Generate SHA1 keys for each file, and compare those instead. If the keys are the same, so are the files. In all likelihood anyway. The chances of two different files yielding the same SHA key are infinitesimally small, but it is possible.

If you find this shit fascinating, read this. If not, well, forget I said anything.

The List of Files in the Torrent

Yeah, that's pretty much just what it says it is.

SHA1 Hashes of the Data in the Torrent

Again, you don't really need to know this, but the files in the torrent are divided up into blocks of a specified size. Each of these blocks gets an SHA1 key generated so that the clients can tell if they're getting the correct data from each other.

Putting it All Together

OK, so that all sounds incredibly complex. Thing is, in practice it isn't. Read on.

So, you've downloaded and installed a BitTorrent client, now what?

Well, the first thing you'll need is a .torrent file. These are described above. You didn't just skip down to this section did you? You can find .torrent files in many places. They're usually hosted on specialized websites, sometimes on a site that also contains their tracker. Also, because they're small in size, they can be easily emailed or posted to message boards. There are also a number of search engines that specialize in finding .torrent files. Later in this guide I'll list some good sources for .torrent files, but for now we'll assume you've already got one.

When you installed your BitTorrent client, chances are it associated files ending in .torrent with itself. If this is the case (and it probably is) double-clicking a .torrent file on your desktop or in Windows Explorer (you do know how to use Windows Explorer, not to be confused with Internet Explorer, don't you?) and it will automagically open your BitTorrent client and begin downloading. Furthermore, if the .torrent extension is associated with your BitTorrent client, your browser will probably offer to open a .torrent file in your BitTorrent client if you click a link to a .torrent file on a web page. What could be easier?

If for some reason .torrent files are not associated with your BitTorrent client, simply launch the client from the start menu, go to the file menu, pick "open" and browse to the .torrent file. Piece of cake.

Your client will then start talking to the tracker and exchanging data with other clients.

Of Seeders and Leechers

When downloading a .torrent file from the web, there is nearly always some key information listed right next to it. The most important thing to look for is the number of seeders and leechers. These are often in columns simply labeled S and L. Instead of leecher, some sites (and some clients) use the term peer, but I'm going to stick with leecher just for the hell of it.

A seeder is a person who has the complete torrent downloaded and is still sharing it. This person is nice to do this, and you should strive to be a nice person and continue to seed after you have the entire torrent downloaded. BitTorrent only works when people seed.

A leecher is a person who is downloading the torrent but still does not have the whole thing. But that's still a good thing. When Bram wrote the BitTorrent protocol, he was wise to implement the idea that all downloaders are also uploading the parts of the torrent they do have to other users. While the clients communicate with each other (having been introduced by the tracker) they are letting each other know what parts of the files they have. Leechers will get different parts of the torrent from the seeders and then share those amongst themselves. This works to nicely balance the load of uploading.

So, knowing that seeders are sharing the whole torrent and leechers are sharing only parts, it logically follows that when looking at a list of torrents on a web site, the number of seeders and leechers is going to be a good indication of how long it will take to download a particular torrent. If there is only one seeder and 10 leechers, prepare to wait awhile and hope that the lone seeder keeps on seeding. If there are no seeders but several leechers, you will never get the complete file. Everyone's download will stop when they've downloaded however much the leecher with the most has available. If there are no seeders and no leechers, you won't get far. The conversation will go like this:

Your Client: Tracker, I really want this torrent. Anybody have it?

Tracker: No.

Your Client (a few seconds later): How about now?

Tracker: Sorry.

Your Client: OK, how about now?

Tracker: Leave me alone.

Anyway, from my experience, 10 or more seeders is usually pretty good, but if you want something bad enough, don't hesitate to jump on a torrent with fewer. Just be prepared to wait awhile.

Using Your Client

Once you're connected to a torrent (technically, you're connected to other clients sharing a torrent, peers as it were, but why quibble) there's certain important information that your client will show you.

Percentage Complete

This is what percentage of the torrent you have already downloaded. If it says 100%, you've got the whole thing and are likely now seeding. Most will give you a handy progress bar that fills up too.

Seeders and Leechers

How many seeders and how many leechers the torrent has. These will fluctuate as people jump on and off the torrent.

Whether You're Seeding or Leeching

The different clients handle this differently, but there will always be an indication of whether you're seeding or leeching the torrent. Azureus has two sections of the main window, one for torrents you're leeching (downloading and uploading) and one for torrents you're seeding (uploading only). BitComet has a little arrow icon next to the torrent name, it points down when you're leeching, up when you're seeding.

Transfer Rates

Somewhere the client will tell you how fast you're downloading (getting the torrent) and how fast you're uploading (sharing the torrent). This is represented by K bytes per second. Your download rate will nearly always be faster, that's just the nature of broadband internet connections (and if you don't have broadband, you won't find much use for BitTorrent anyway).

40K is an OK download speed, 100K is great. I've seen it go as high as 300K. Cherish the moments when you top 200K.

As far as upload speed goes, 40K is good. Of course, if you have multiple torrents going at the same time, this will be split up amongst them. Your client will decide how to divide your total upload capacity based on how badly it feels the other torrents need the speed.

Peer Details

Somewhere, your client will show you a list of all the peers you're connected to, their IP address, what client they're using, their complete percentage, their upload and download speeds (as they apply to you) and whatnot. In Azureus, you can see this and other information by double-clicking the torrent in the list of all your active torrents. In BitComet I believe there's a button that will bring this info up. In BitTornado it's a link that says "details" I think. Maybe it says "Advanced", I don't really remember.

Links to Other Good Stuff

More Information

BitTorrent Clients

Torrent Sites

All Legal, All the Time.

http://bt.etree.org/
Live music by bands that allow taping. Phish, Govt. Mule, Dave Matthews and more Grateful Dead than you can shake a bong at. Seriously though, there's a lot of good music here by a lot of good bands.
http://www.legaltorrents.com/
Stuff made by people who give it away.
http://www.tlm-project.org/
The Linux Mirror Project. All the Linux distributions you'll ever need, and some you won't.

Torrent Search Engines

The sites listed above have all legal torrents. The following may turn up the other kind.

http://www.torrentspy.com/
Good search engine.
http://www.isohunt.com/
Good search engine with nice interface.
http://www.torrentsearch.com/
Submit one search to multiple search engines. This site used to be great because it worked well. Thankfully they've corrected that.
http://www.torrentreactor.to/
Finds you torrents you didn't even know you were looking for (because the searches are so loose).

In Conclusion...

Have fun, and I'll see you at the party.