From owner-freebsd-net@FreeBSD.ORG Sat Dec 29 00:17:30 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9931416A473 for ; Sat, 29 Dec 2007 00:17:30 +0000 (UTC) (envelope-from tiffany.snyder@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by mx1.freebsd.org (Postfix) with ESMTP id 7224513C459 for ; Sat, 29 Dec 2007 00:17:30 +0000 (UTC) (envelope-from tiffany.snyder@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so6144557waf.3 for ; Fri, 28 Dec 2007 16:17:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=CdVoIH36qEnbPidpKj43UeADBK2JZVYfG27riZz/+vw=; b=HPLvEktvVnEfDnqt+vTLKwICVoKFD7XN5Hmbq/eWCSZQ8no/2w4dk/9o4cxjhmNSBa+rvriq8rKU7kw+pmd3JR4MdUzP/NdDQQMeMJ2+KcQ5RTaUIOo5XPwIbCqUVpouhN2zpUJDqZvJ9dK7DZNcuz0F0WpETFnHRuLLMkqOQdw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Gg8j8gO3jmt96C7RTWxHWaGxTlI/rcQJgVyxQ/+0+aBrBKatLcEF0jAf2Ue2PLslKgs9FqHOfYscNfNkcUupFZviENaa2km0PIseuUGehC3WJXHa2YctRt8ljgFc/XDG13ULQo/DwaOnxbWAXizRG9jVLxiZtI/3S4da9US70Tg= Received: by 10.142.114.15 with SMTP id m15mr3262604wfc.235.1198885891831; Fri, 28 Dec 2007 15:51:31 -0800 (PST) Received: by 10.142.44.7 with HTTP; Fri, 28 Dec 2007 15:51:31 -0800 (PST) Message-ID: Date: Fri, 28 Dec 2007 15:51:31 -0800 From: "Tiffany Snyder" To: "Andre Oppermann" In-Reply-To: <43B47CB5.3C0F1632@freebsd.org> MIME-Version: 1.0 References: <43B45EEF.6060800@x-trader.de> <43B47CB5.3C0F1632@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: Routing SMP benefit 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: Sat, 29 Dec 2007 00:17:30 -0000 Hi Andre, are those numbers for small (64 bytes) packets? Good job on pushing the base numbers higher on the same HW. What piqued my attention was the note that our forwarding performance doesn't scale with multiple CPUs. Which means there's a lot of work to be done :-) Have we taken a look at OpenSolaris' Surya (http://www.opensolaris.org/os/community/networking/surya-design.pdf) project? They allow multiple readers/single writer on the radix_node_head (and not a mutex as we do) and we may be able to do the same to gain some parallelism. There are other things in Surya that exploit multiple CPUs. It's definitely worth a read. DragonFlyBSD seems to achieve parallelism by classifying packet as flows and then redirecting the flows to different CPUs. OpenSolaris also does something similar. We can definitely think along those lines. NOTE: 1) I said multiple instead of dual CPUs on purpose. 2) I mentioned OpenSolaris and DragonFlyBSD as examples and to acknowledge the work they are doing and to show that FreeBSD is far behind and is losing it's lustre on continuing to be the networking platform of choice. Thanks, Tiffany. On 12/29/05, Andre Oppermann wrote: > Markus Oestreicher wrote: > > > > Currently running a few routers on 5-STABLE I have read the > > recent changes in the network stack with interest. > > You should run 6.0R. It contains many improvements over 5-STABLE. > > > A few questions come to my mind: > > > > - Can a machine that mainly routes packets between two em(4) > > interfaces benefit from a second CPU and SMP kernel? Can both > > CPUs process packets from the same interface in parallel? > > My testing has shown that a machine can benefit from it but not > much in the forwarding performance. The main benefit is the > prevention of lifelock if you have very high packet loads. The > second CPU on SMP keeps on doing all userland tasks and running > routing protocols. Otherwise your BGP sessions or OSPF hellos > would stop and remove you from the routing cloud. > > > - From reading the lists it appears that net.isr.direct > > and net.ip.fastforwarding are doing similar things. Should > > they be used together or rather not? > > net.inet.ip.fastforwarding has precedence over net.isr.direct and > enabling both at the same doesn't gain you anything. Fastforwarding > is about 30% faster than all other methods available, including > polling. On my test machine with two em(4) and an AMD Opteron 852 > (2.6GHz) I can route 580'000 pps with zero packet loss on -CURRENT. > An upcoming optimization that will go into -CURRENT in the next > few days pushes that to 714'000 pps. Futher optimizations are > underway to make a stock kernel do close to or above 1'000'000 pps > on the same hardware. > > -- > Andre > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to " freebsd-net-unsubscribe@freebsd.org" >