Re: [hybi] Background info: Properties of sendfile()

Willy Tarreau <w@1wt.eu> Fri, 06 August 2010 09:10 UTC

Return-Path: <w@1wt.eu>
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 2CC733A6803 for <hybi@core3.amsl.com>; Fri, 6 Aug 2010 02:10:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.769
X-Spam-Level:
X-Spam-Status: No, score=-2.769 tagged_above=-999 required=5 tests=[AWL=-0.726, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 DRPNT0DC+-mZ for <hybi@core3.amsl.com>; Fri, 6 Aug 2010 02:10:50 -0700 (PDT)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id EFB7A3A67FE for <hybi@ietf.org>; Fri, 6 Aug 2010 02:10:49 -0700 (PDT)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id o769BAIb027684; Fri, 6 Aug 2010 11:11:10 +0200
Date: Fri, 06 Aug 2010 11:11:10 +0200
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20100806091110.GA26139@1wt.eu>
References: <4C5B2029.90403@gmx.de> <AANLkTim1WeCRfcPxXUNQcVhb4+t_TtDQDv2bXaxOQ=bk@mail.gmail.com> <01098AD0-FBF4-4A61-B565-947C95722BAA@apple.com> <AANLkTi=qQSND5BvUP5+P=wJ7E8SG6NncGZH8U8+VYwZ0@mail.gmail.com> <20100806004907.GF27827@shareable.org> <C0FC87B7-C51C-4B36-BC16-DBDB0B00A20F@gbiv.com> <20100806012845.GI27827@shareable.org> <AANLkTimuvuj87qwQi_1Gjg47-gGrCsDCQ5TDd5zvOw1N@mail.gmail.com> <20100806062928.GF20057@1wt.eu> <4A6B1B75-584C-44C6-B69A-F11AE0B59896@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <4A6B1B75-584C-44C6-B69A-F11AE0B59896@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "Roy T. Fielding" <fielding@gbiv.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Background info: Properties of sendfile()
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: Fri, 06 Aug 2010 09:10:51 -0000

On Fri, Aug 06, 2010 at 02:08:28AM -0700, Maciej Stachowiak wrote:
> 
> On Aug 5, 2010, at 11:29 PM, Willy Tarreau wrote:
> 
> > On Thu, Aug 05, 2010 at 06:47:48PM -0700, Roberto Peon wrote:
> >> Thus my statement of "theoretical" benefits.
> >> I've not seen the benefits of either splice or sendfile yet.
> > 
> > At least I've seen it. Haproxy happily forwards traffic at 10 Gbps
> > with only 25% of one CPU core on a 2.66 GHz Core2Duo using splice().
> > And some file sharing sites make a big use of it ! Without splice,
> > it hardly achieves 10 Gbps at 100% CPU.
> > 
> > Anyway, it's unclear to me why we would need to send large amounts
> > of data over WebSockets. File serving could well be performed by
> > the web server itself.
> 
> I already cited the use case of sync. It's likely that in a case like filesystem sync or media sync, large data objects will be sent in both directions, and it will likely be advantageous to send them over WebSocket rather than using a separate HTTP exchange for each file transfer.

Ah that's a good example. I didn't see your mail, but I agree that it
would be a suited case of massive data exchange.

Regards,
Willy