Re: Naive question on multiple TCP/IP channels

Roberto Peon <grmocg@gmail.com> Wed, 04 February 2015 19:42 UTC

Return-Path: <grmocg@gmail.com>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4D6011A1BEF for <ietf@ietfa.amsl.com>; Wed, 4 Feb 2015 11:42:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BIZYo722APxm for <ietf@ietfa.amsl.com>; Wed, 4 Feb 2015 11:42:34 -0800 (PST)
Received: from mail-oi0-x22f.google.com (mail-oi0-x22f.google.com [IPv6:2607:f8b0:4003:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CDF9B1A1BC5 for <ietf@ietf.org>; Wed, 4 Feb 2015 11:42:33 -0800 (PST)
Received: by mail-oi0-f47.google.com with SMTP id a141so2993598oig.6 for <ietf@ietf.org>; Wed, 04 Feb 2015 11:42:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xO5TK1k0sHdTxRgIjyJfsJL0Ky261NVe2T4ReftD8Q0=; b=McAkLEoR0aUJkSK8ekm9vGwdl3oL7qA3RcUd/EIGbyt+N8XSddnlB+uxRHIk11DGpy 5XqjqS7Wd/2BLTrEi5yD2Xs7mQNwvYF+KNJ2Guqux51az9KtCexmvFNSmfJ2GPZz9S4b aqiBmLlkIbN++ONX24vtwY0tlDZrmaYm49tnuU31bE02xJkn3LLoxLJaZpovu5qz9M4U b5HnMBrjZxtaLYzY+yVdgCDuyE+2/RW+Ac724Rs9F6+35LhHoYPssDeWbHNokFGOSq4M E2xNXsJ+CH0zNuE7uC/7PxmQzi+1Tul8qyx7cc5b+Zh12dCeVXbPh4nSXX/plzvEP7Rv BTAw==
MIME-Version: 1.0
X-Received: by 10.202.48.16 with SMTP id w16mr18809856oiw.17.1423078952866; Wed, 04 Feb 2015 11:42:32 -0800 (PST)
Received: by 10.76.91.69 with HTTP; Wed, 4 Feb 2015 11:42:32 -0800 (PST)
In-Reply-To: <CAMm+Lwgb9L9bUG6ommBDYJzQTCU1cC_zLSEf_5JPeJ+c=yrYmA@mail.gmail.com>
References: <CAMm+Lwgb9L9bUG6ommBDYJzQTCU1cC_zLSEf_5JPeJ+c=yrYmA@mail.gmail.com>
Date: Wed, 04 Feb 2015 11:42:32 -0800
Message-ID: <CAP+FsNcGVPCVHY7qvOh9XWnBuaU8zVzaKBTr=r5R8n=kQ75JEg@mail.gmail.com>
Subject: Re: Naive question on multiple TCP/IP channels
From: Roberto Peon <grmocg@gmail.com>
To: Phillip Hallam-Baker <phill@hallambaker.com>
Content-Type: multipart/alternative; boundary="001a113cd1267918fd050e4863f4"
Archived-At: <http://mailarchive.ietf.org/arch/msg/ietf/XaTJ2BoFfLAy85rYMaOeDyoWzzI>
Cc: IETF Discussion Mailing List <ietf@ietf.org>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf/>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Feb 2015 19:42:36 -0000

We did experimentation and real-world measurement w.r.t. HTTP2/SPDY and
HTTPS along these lines.

Multiple TCP streams are faster so long as the congestion context from one
connection isn't informed by the other connections' contexts and the
connections are using a reasonable percentage of their maximum rate.
Below the maximum rate, and there ended up being adverse effects thanks to
not triggering various TCP optimizations and requiring timeouts.

Some of the obvious effects occur at the start of the connection, with
ICWND=10, 6 connections get 60 packets worth, while one gets 10.

Unfortunately, I don't have data to give anymore, but folks at Google who
are still working on this stuff (no longer me) may have more up-to-date
information.
What is definitely true is that the fact that this is all an artifact of
the fact that congestion controllers are instantiated per connection
instead of for wider contexts, and are currently loss-based instead of
rate/timing based (which does have its own problems).
-=R

On Wed, Feb 4, 2015 at 11:22 AM, Phillip Hallam-Baker <phill@hallambaker.com
> wrote:

> Today most Web browsers attempt to optimize download of images etc. by
> opening multiple TCP/IP streams at the same time. This is actually done for
> two reasons, first to reduce load times and second to allow the browser to
> optimize page layout by getting image sizes etc up front.
>
> This approach first appeared round about 1994. I am not sure whether
> anyone actually did a study to see if multiple TCP/IP streams are faster
> than one but the approach has certainly stuck.
>
> But looking at the problem from the perspective of the network it is
> really hard to see why setting up five TCP/IP streams between the same
> endpoints should provide any more bandwidth than one. If the narrow waist
> is observed, then the only parts of the Internet that are taking note of
> the TCP part of the packet are the end points. So having five streams
> should not provide any more bandwidth than one unless the bandwidth
> bottleneck was at one or other endpoint.
>
> Now there are some parts of the deployed Internet that do actually perform
> statefull inspection. But I would expect increasing the number of channels
> to degrade performance at a firewall or any other middle boxen.
>
> So we have a set of behavior that seems at odd with the theory. Has anyone
> done any experiments recently that would show which is right?
>
>
> The reason it makes a difference is that it is becoming clear that modern
> applications are not best served by an application API that is limited to
> one bi-directional stream. There are two possible ways to fix this
> situation. The first is to build something on top of TCP/IP the second is
> to replace single stream TCP with multi-stream.
>
> My preference and gut instinct is that the first is the proper
> architectural way to go regardless of the performance benefits. When
> Thompson and co were arguing that all files are flat sequences of bits,
> they were saying that was the right O/S abstraction because you could build
> anything you like on top.
>
> But then I started to ask what the performance benefits to a multi-stream
> TCP might be and I am pretty sure there should not be any. But the actual
> Internet does not always behave like it appears it should.
>
> I suspect that the preference for multiple streams probably comes from the
> threading strategies it permits. But that is an argument about where the
> boundary between the kernel and application is placed in the network stack
> rather than where multiplex should live in the stack. Microsoft already
> provides a network stack for .NET where the boundary is in the HTTP layer
> after all.
>
>
> So anyone got hard data they could share?
>