From owner-freebsd-net Fri Nov 15 10: 6:37 2002 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 9CDE537B404 for ; Fri, 15 Nov 2002 10:06:36 -0800 (PST) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92A0243E75 for ; Fri, 15 Nov 2002 10:06:32 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id NAA22651; Fri, 15 Nov 2002 13:06:31 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id gAFI61U54811; Fri, 15 Nov 2002 13:06:01 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15829.14217.577949.84752@grasshopper.cs.duke.edu> Date: Fri, 15 Nov 2002 13:06:01 -0500 (EST) To: Petri Helenius Cc: freebsd-net@freebsd.org Subject: Re: em0 under CURRENT In-Reply-To: <3DD29165.8010904@he.iki.fi> References: <3DD29165.8010904@he.iki.fi> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Petri Helenius writes: > options upped the performance to ~300Mbps:ish while 4.7-STABLE gives twice > that using the same application. The machine is 2.4GHz Dual P4. > Yes, -current is much, much slower for networking than -STABLE. This is because at this point, network drivers have paid all the cost for medium-grained locking (interrupts as kernel threads, mutexes all over the place, etc), but network drivers cannot take advantage of any of this yet. I think the last bottleneck to get network drivers out from under Giant is the VM system. Currently, when a network driver allocates an mbuf or mbuf cluster, it must hold Giant. This is because the mbuf allocator may need to call into the VM system to allocate more memory. If this could be solved (via either bringing the VM system out from under Giant, or by having some sort of thread to handle mbuf allocations asynchronously in a different context), I think -current would be almost as fast as -stable for networking. FWIW, I see 1875Mb/sec on 4.5-STABLE and 1200Mb/sec on -current with my Myrinet GM driver on Dual 1GHz PIIIs. This is with zero-copy sends enabled on -current. Since P4's have gobs of memory bandwidth, I doubt zero-copy sends would help you very much. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message