From owner-freebsd-net@FreeBSD.ORG Thu Sep 21 10:30:32 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4449716A518 for ; Thu, 21 Sep 2006 10:30:32 +0000 (UTC) (envelope-from cjeker@diehard.n-r-g.com) Received: from diehard.n-r-g.com (diehard.n-r-g.com [62.48.3.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7C8743D49 for ; Thu, 21 Sep 2006 10:30:31 +0000 (GMT) (envelope-from cjeker@diehard.n-r-g.com) Received: (qmail 21584 invoked by uid 1001); 21 Sep 2006 10:30:30 -0000 Date: Thu, 21 Sep 2006 12:30:30 +0200 From: Claudio Jeker To: freebsd-net@freebsd.org Message-ID: <20060921103030.GA30890@diehard.n-r-g.com> Mail-Followup-To: Claudio Jeker , freebsd-net@freebsd.org References: <4511B9B1.2000903@freebsd.org> <20060921075903.GD960@turion.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060921075903.GD960@turion.vk2pj.dyndns.org> User-Agent: Mutt/1.5.12-2006-07-14 Subject: Re: Much improved sendfile(2) kernel implementation X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2006 10:30:32 -0000 On Thu, Sep 21, 2006 at 05:59:03PM +1000, Peter Jeremy wrote: > On Wed, 2006-Sep-20 23:59:13 +0200, Andre Oppermann wrote: > >I have rewritten kern_sendfile() to work in two loops, the inner which turns > >as many pages into mbufs as it can up to the free send socket buffer space. > > The 64K blocks sounds good but how does this interact with TCP slow > start? Is there the possibility that a couple (for some reasonably > large value of 'couple') of TCP connections slowly accepting a file > could eat all the mbuf space? > You always have this issue no matter if you use sendfile or not. This is why the socket buffers are limited and why sometimes having large sendbuffers is bad -- especially on busy servers. -- :wq Claudio