You are viewing bramcohen

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

A random person asks about something they read on Wikipedia:

Example from wiki below:

http://en.wikipedia.org/wiki/Bram_Cohen

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)
slayemin

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.

Tue, Jul. 7th, 2009 09:07 am (UTC)
4zumanga

In general, I find I get the fastest download times in bittorrent when I limit my upload to slightly less than line capacity.

In general, for whatever reason, bittorrent seems to work well for distributing new files, it's only flaw I find in practice is files tend not to live as long as they do on some other networks, which seems to be mainly down to clients, which encourage users to stop seeding "for neatness", rather than continuing to do it in the background.

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

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.

Tue, Jul. 7th, 2009 03:58 pm (UTC)
niklasro.blogspot.com : bittorrent

bittorrent is good too for letting go of harddrive and other mechanical storage that usually fail first in any computer. It seems bittorrent files move faster at the beginning of the file and that the protocol isn't well suited for streaming. Kindly elaborate if you want.
Cheers
NickRTZ

Wed, Jul. 8th, 2009 09:37 am (UTC)
no_gritzko_here : just to continue the line of thought

So, basically, uTP/ledbat makes the client non-intrusive; then, the user loses any rational motivation to shut the client down. If localization/alto works, the ISP also loses any motivation for throttling (also, ISPs might be concerned about in/out traffic balance).
Then, tit-for-tat goes to the bin and out-of-order retrieval likely follows.
Or is it too far-fetched?

Wed, Jul. 8th, 2009 04:12 pm (UTC)
bramcohen : Re: just to continue the line of thought

Yes, that's the big new feature of the release of uTorrent which is currently being rolled out.