PermaLink TCP is broken
Here's something you may not have known before and which is often overlooked in the net neutrality debate.

TCP is broken. By design.

OK. Now that I have your attention, I'll attempt to justify that provocative suggestion.

George Ou at Tech Republic posted a fascinating piece entitled "Fixing the unfairness of TCP congestion control" the other day.

In it, George reminds us of Jacobson's AIMD (Additive Increase Multiplicative Decrease) algorithm which ensures that a computer sending data is constantly probing for the maximum allowable bandwidth in a way which ensures that all available bandwidth is divided up among all users fairly.

Jacobson's AIMD algorithm was invented at a time when there were perhaps 30,000 computers on the Internet and when it was relatively unusual for large numbers of TCP streams to be open on one computer at one time.

Because the algorithm is implemented at the TCP stream level, a computer opening multiple streams has multiple bites of the cherry when it comes to the fair sharing of bandwidth. That was OK in 1986, but it isn't OK today.

Why?

Well, it would be easy to say that it's all down to P2P - and this is where George Ou's article seems to point the finger. P2P opens many TCP streams simultaneously by design. In fact, it is impossible for P2P to work without opening multiple TCP streams, because each stream is open to a different peer.

Combining this facet of P2P behaviour with the other common one - many P2P seeders are on-line all the time - George concludes that a single persistent P2P user can get 100 times his fair share of bandwidth. The tables and graphs on page 2 of the article illustrate the point well.

What about other applications that open multiple TCP streams? Do we know any?

Well, I am sure there are plenty. In addition to the commercial P2P systems such as Kontiki (which is the P2P network behind the BBC iPlayer, Channel 4OD and some of Sky's on-demand services), there are download managers which work by opening up multiple streams to a single server. Look no further than IBM's own Download Director for an example of a download manager which takes advantage of TCP congestion control by opening multiple connections.

And, I might add, there's absolutely nothing wrong with that. Download Director simply plays by the established rules. In fact P2P is also innocent, even if it is very often used for legally questionable purposes like distributing movies or music when the intellectual property rights of the owner of this content prohibit such distribution.

(Aside: BitTorrent is the preferred download mechanism for quite a lot of open source software - gOS is a good example. This is of course perfectly legal.)

Oh, forget P2P and download managers. Let's just go to the operating system itself. A quick count of open TCP connections on my own computer just now reveals 34 of them. And that's without P2P or any active downloads. That is just a typical modern computer with a handful of applications open.

The thing that's broken here isn't the client or server side software, it is the TCP stack. So, how can it be fixed?

Bob Briscoe, Chief researcher at the BT Network Research Centre, outlines a proposal with two phases.
  1. Patch the existing Jacobson algorithm by applying weighting so that all TCP streams on a single computer get the same bandwidth as a single stream would get.

  2. Implement ECN, which was supposed to replace AIMD in about 2001 but still has not done so.

Sadly, I see problems with both of these.

  1. Patching TCP means patching the stack on every computer in the world. Even if software vendors step up to this challenge (and not all will, I am sure), this will only give rise to a new commercial enterprise - companies that will sell you back your unfair multiple streaming advantage by using replacement TCP stacks or by patching the patch, to neutralise its effect.

  2. ECN is a comparative newcomer in the Internet protocol must haves list. It is preceded by IPv6 which, despite the clear and present need for wholesale migration, is still nowhere. If we can't organise to deploy IPv6 (which, don't forget, is absolutely mandatory due to the imminent exhaustion of the IPv4 address pool), then I really don't see ECN rising up the agenda particularly fast.

Bottom line: I expect TCP to stay the way it is and ISPs to take different steps to solve their bandwidth issues. This is where net neutrality is really under threat. Absent a suitable and widely deployed bandwidth sharing algorithm in the network stack, bandwidth shaping by ISPs using altogether cruder tools is probably inevitable.

Category: T'Internet
Technorati:

Comments :

1. Ben Rose26/03/2008 14:47:47
Homepage: http://www.jaffacake.net


Electricity...gas...data. All 3 have increased costs as volumes increase. Only one of them has a fixed monthly charge...why?

As much as it would affect me, I can only think it would be fairer for all homes to have a router installed in their meter cupboard with a cat5 connection. As with gas and electric you can choose which provider to sign up with, different tariffs etc. but ultimately you pay for what you use.

I just can't see why data is unmetered when the cost of providing it increases with usage.




2. Bill Brown26/03/2008 14:48:26


Do you know what every single one of those open connections is doing? That many open connections when you are not actively doing anything suggests your machine might be compromised.




3. Ben Rose26/03/2008 15:08:54
Homepage: http://www.jaffacake.net


@Bill - It's not uncommon to have loads of active connections on a machine with a few utilities open these days...especially given the amount of update checking tools there are for tools from Adobe, Apple etc.

Windows update is also pretty guilty of opening lots of connections.

Going back to my metering suggestions above, maybe tools like Windows update would be able to purchase a 'freephone' IP address that wouldn't charge customers for data.




4. Chris Linfoot26/03/2008 15:18:32


@Bill - yes I know what every one of them is and this system is not compromised. Get a command prompt and issue a netstat -a command. You may be surprised.

@Ben - re metering - sounds perfect until you think about it. With gas, I can turn down the heating. With electricity, I can turn off the lights, use energy efficient devices and so on. With water, I can put a brick in the cistern, turn off the tap while I'm brushing my teeth and so on. All very simple actions.

It is far less easy for most people to turn off processes which consume bandwidth. Most people wouldn't know where to start looking, unless you are advocating a policy of switching off the border router until you need to look at a web site.




5. Charles Robinson26/03/2008 21:07:25


It is a little misleading to say that the cost of providing bandwidth increases with usage. ISP's buy capacity in blocks with terms usually measured in years. I don't know of any wholesale provider who bills based on actual usage, but I'm only tertially involved in telephony so you could easily know something I don't. In every case I'm familiar with the costs incurred by the ISP are fixed because they lease X bandwidth for Y period of time at Z cost, then sublet it to customers. In strict economic terms, the more people using the bandwidth the less it costs the ISP.

What does increase costs is providing dedicated bandwidth per user. Guaranteeing everyone 10mbit means there has to be more overall resources than guaranteeing everyone 1mbit. In that sense the cost does go up with usage (in this case that's equivalent to customers or subscribers), but that is certainly known by the ISP's and can be effectively managed. And to be clear, at no time is the ISP paying a metered rate for anything. Tariff rates may go up or down monthly, but that's a whole different set of insanity.

I don't think metered access makes sense because, as Chris points out, you have little control over what you actually use. Even with that being the case, perhaps if Internet access were metered it would add economic incentive to shutting down the spammers and getting companies such as Adobe, Microsoft and Apple to stop wasting bandwidth with their stupid autoupdaters that can't be easily disabled.




Unable to post a comment? Please read this for a possible explanation...
Add Manual Trackback
Please enter the details of the trackback post. Your trackback will not appear on the site until it has been verified. This won't be immediate, as trackbacks are validated on a scheduled basis. Be patient.











Search
Popular Categories
Monthly Archive
Other stuff
ClustrMaps
Meta
Proudly powered by IBM Lotus Domino 8 Proudly powered by IBM Lotus Domino 8

Subscribe to articles Subscribe to articles feed

Subscribe to comments Subscribe to comments feed

ROR info ROR info

Like what I do?
Then please consider a donation to support the work of Research Autism.

Idea Jam
Planet Lotus
Contact Me