Log in

No account? Create an account

Mon, Jul. 6th, 2009, 04:07 pm
Bandwidth fundamentals

A random person asks about something they read on Wikipedia:

Example from wiki below:


quote from site:

MojoNation allows people to break up confidential files into encrypted chunks and distribute those pieces on computers also running the software. If someone wanted to download a copy of this encrypted file, he would have to download it simultaneously from many computers. This concept, Cohen thought, was perfect for a file sharing program, since programs like KaZaA take a long time to download a large file because the file is (usually) coming from one source (or "peer"). Cohen designed BitTorrent to be able to download files from many different sources, thus speeding up the download time, especially for users with faster download than upload speeds. Thus, the more popular a file is, the faster a user will be able to download it, since many people will be downloading it at the same time, and these people will also be uploading the data to other users.

This explanation was lifted from an actual new article, which doesn't necessarily mean it's true. In fact, it's somewhere between grossly misleading and wrong.

There's a classic fallacy because if one person stands up during a concert they get a better view, then if everybody stood up during a concert they'd all get a better view. This is of course is not true - they wind up slightly worse off by all standing, because they all compete with each other for a view. The same thing happens with downloading from a server. In general, web servers will give about the same rate to every client downloading from them, so if you open many more connections than everybody else you get a greater proportion of the bandwidth and hence a better rate. But you do so simply by taking bandwidth from other downloaders. The overall supply of upload is unchange, it's simply being shuffled around. If everybody does the same thing it results in overall slightly worse performance and you're basically back where you started, but with a bunch of headaches tacked on.
So why does BitTorrent perform so well? Quite simply, because it does a better job of finding more places to do uploading. Any peer which is downloading is in general willing to upload as well, and their uplink is usually unutilized, so if you can get a peer to start uploading as soon as it starts downloading, and keep uploading as long as possible, and saturate its link while it's uploading, then overall performance will be better. It doesn't necessarily help to transfer over more connections, or make more different things available at the same time, or use error correcting codes. In fact, all of those are a complex tradeoff between benefits and costs, with the net result being that small amounts of them can help reliability and robustness, but in general it's good to keep things simple and be polite to the network.

On the internet, the formula is bytes downloaded = bytes uploaded. It's that simple.

Tue, Jul. 7th, 2009 08:10 am (UTC)

The design flaw with this model lies with human nature however... Since the internet is anonymous, users are self-interested (and unlikely to be utilitarian as your view seems to assume). A self-interested person who realizes that their download speed suffers greatly when uploading will minimize their upload speed to maximize download speeds. The effect would change the duration of a download from days to hours (on a DSL line), which means that they get their data faster. Once they have their data, aside from altruism, there is no remaining motivation to continue uploading. The result is that some people may not have the 1:1 give/take ratio.
the solution can be handled either by changing the ISP so that uploads and downloads don't influence each other (seperate the lines),
or enforcing a share ratio by giving preferential treatment to higher ratios and negative treatment to low ratios.

Wed, Jul. 8th, 2009 12:33 am (UTC)

The way in which uploading interferes with downloading is an artifact of TCP suckage. It can be fixed by either limiting the upload rate, or by using a transfer protocol which does latency based on delays rather than packet loss, which we're rolling out as the default in uTorrent.