Re: [hybi] hum #3: Message

Roberto Peon <fenix@google.com> Thu, 05 August 2010 20:39 UTC

Return-Path: <fenix@google.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6FFD53A6902 for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 13:39:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.836
X-Spam-Level:
X-Spam-Status: No, score=-101.836 tagged_above=-999 required=5 tests=[AWL=0.140, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Rj+-V+C6cSRU for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 13:39:39 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.35]) by core3.amsl.com (Postfix) with ESMTP id F2E223A6998 for <hybi@ietf.org>; Thu, 5 Aug 2010 13:39:38 -0700 (PDT)
Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id o75Ke8PR018072 for <hybi@ietf.org>; Thu, 5 Aug 2010 13:40:08 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1281040809; bh=lq+eFWYMHmlvAPTDJGue2oao8EQ=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=cHO1R8IN6YJVn94zLuYeb72gBsVBVhhSAKWvCz+lYx4wftDKoqoPwnqqj4MPC/mj7 hYBCUIPQvg6Q8vqn/XNsA==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:x-system-of-record; b=MjEfNqXRRStGSqiSd0CiilYOue2OtBCU2DRnKM/KmJnkasBaS2dlxrbRdwrUZjqxa 2jhi6v4e193AhQVpbnV+g==
Received: from gwj18 (gwj18.prod.google.com [10.200.10.18]) by wpaz33.hot.corp.google.com with ESMTP id o75KdxZd007693 for <hybi@ietf.org>; Thu, 5 Aug 2010 13:40:02 -0700
Received: by gwj18 with SMTP id 18so4192309gwj.2 for <hybi@ietf.org>; Thu, 05 Aug 2010 13:40:02 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.74.2 with SMTP id w2mr12989165yba.358.1281040801800; Thu, 05 Aug 2010 13:40:01 -0700 (PDT)
Received: by 10.150.59.4 with HTTP; Thu, 5 Aug 2010 13:40:01 -0700 (PDT)
In-Reply-To: <4C5B2029.90403@gmx.de>
References: <4C5AE93D.4040803@ericsson.com> <Pine.LNX.4.64.1008051758290.5947@ps20323.dreamhostps.com> <AANLkTik0kbh14s2JZARY2MFh0iNGV7H+B4Px4yG+wX44@mail.gmail.com> <71BCE4BF-D3F6-4F94-BE76-306BDF6A2E67@apple.com> <Pine.LNX.4.64.1008051930160.5947@ps20323.dreamhostps.com> <4C5B1695.6070704@gmx.de> <F8E2F702-9F74-4316-B3B2-D5A731409ABF@apple.com> <4C5B2029.90403@gmx.de>
Date: Thu, 05 Aug 2010 13:40:01 -0700
Message-ID: <AANLkTi=Gbo8m538Edv6-akfcPp9wpXfFQMwQSDOZNw2g@mail.gmail.com>
From: Roberto Peon <fenix@google.com>
To: Julian Reschke <julian.reschke@gmx.de>
Content-Type: multipart/alternative; boundary="000e0cd4cbcaef242a048d198d24"
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] hum #3: Message
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Aug 2010 20:39:40 -0000

On Thu, Aug 5, 2010 at 1:33 PM, Julian Reschke <julian.reschke@gmx.de>wrote:

> On 05.08.2010 22:21, Maciej Stachowiak wrote:
>
>>
>> On Aug 5, 2010, at 12:52 PM, Julian Reschke wrote:
>>
>>  On 05.08.2010 21:31, Ian Hickson wrote:
>>>
>>>> On Thu, 5 Aug 2010, Maciej Stachowiak wrote:
>>>>
>>>>>
>>>>> That being said, I think you're misunderstanding Ian's point. He
>>>>> expressed concern about the overhead for small messages to having a
>>>>> large fixed length, not the overhead to large messages of a chunked
>>>>> encoding.
>>>>>
>>>>
>>>> I was trying to express both.
>>>>
>>>> Having to split a 2GB file into a bazilion pieces and write each one out
>>>> individually with frame headers, compared to just writing the whole
>>>> thing
>>>> at once, seems inefficient far beyond simply the concern about the
>>>> on-the-wire overhead.
>>>>
>>>
>>> Hum, where exactly do you see the additional overhead? It's not like you
>>> need to split it into inidividual *files* - you just interleave the data
>>> with the frame headers while writing to the stream...
>>>
>>
>> Sending a file from disk to the network without processing it in any way
>> is more efficient than cutting it into slices and interleaving with headers.
>> The IP layer is already going to cut it into slices, in a way that almost
>> certainly won't line up with WebSocket-level fragment boundaries.
>>
>
> There's no way to "send a file over the network without processing". You
> need to read it into memory, and then write it to the network. Of course
> adding frame headers *is* overhead, but it's really identical or close to
> the overhead on the wire, nothing more.


Well, that isn't entirely true. There are now kernel interfaces for doing
such things without userspace involvement. I doubt that we're at the level
of DMAing directly from the disk to the network device, so we're probably
hitting main-memory at some point, but there is certainly the potential for
higher thruput using these interfaces. My experience has been that this
theoretical increase isn't yet realized, but it *should* be soon.

-=R


>
>  It's also more efficient for the receiver if they know the length up
>> front. That way they can determine whether to allocate a large enough
>> buffer, or just start spooling to persistent storage immediately.
>>
>
> Absolutely. When the length is known (see video streaming and on-the-fly
> compression). Thus, it might be good to be able to announce the eppected
> size upfront.
>
> Best regards, Julian
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>