From owner-freebsd-hackers Wed Mar 19 1:45:29 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E58B37B401 for ; Wed, 19 Mar 2003 01:45:27 -0800 (PST) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1169943F3F for ; Wed, 19 Mar 2003 01:45:27 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.3/8.12.3) with ESMTP id h2J9jOAq088136; Wed, 19 Mar 2003 01:45:24 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.3/8.12.3/Submit) id h2J9jNkH088135; Wed, 19 Mar 2003 01:45:23 -0800 (PST) (envelope-from rizzo) Date: Wed, 19 Mar 2003 01:45:23 -0800 From: Luigi Rizzo To: mooring@Lnxw.com Cc: Borje Josefsson , freebsd-hackers@FreeBSD.ORG Subject: Re: High CPU usage on high-bandwidth long distance connections. Message-ID: <20030319014523.A87669@xorpc.icir.org> References: <200303181951.h2IJpTKl001940@dc.luth.se> <20030318132831.P6615@newbast.lynuxworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030318132831.P6615@newbast.lynuxworks.com>; from emooring@Lnxw.com on Tue, Mar 18, 2003 at 01:28:31PM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Mar 18, 2003 at 01:28:31PM -0800, Ed Mooring wrote: ... > I had something vaguely similar happen while I was porting the FreeBSD > 4.2 networking stack to LynxOS. It turned out the culprit was sbappend(). > It does a linear pointer chase down the mbuf chain each time you do > a write() or send(). With a high bandwidth-delay product, that chain > can get very long. > > This topic came up on freebsd-net last July, and Luigi Rizzo provided > the following URL for a patch to cache the end of the mbuf chain, so > sbappend() stays O(1) instead of O(n). the patch was only for UDP though. I think the poster was seeing the problem with TCP (which is also affected by the same thing). cheers luigi > http://docs.freebsd.org/cgi/getmsg.cgi?fetch=366972+0+archive/2001/freebsd-net/20010211.freebsd-net > > The subject of the July thread was 'the incredible shrinking socket', if > you want to hunt through the archives. > > Hope this helps. > > -- > Ed Mooring (mooring@lynuxworks.com) > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message