From owner-freebsd-net@FreeBSD.ORG Fri Dec 30 00:17:55 2005 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 6084F16A41F for ; Fri, 30 Dec 2005 00:17:55 +0000 (GMT) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEDD143D5E for ; Fri, 30 Dec 2005 00:17:53 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 76769 invoked from network); 30 Dec 2005 00:22:52 -0000 Received: from c00l3r.networx.ch (HELO freebsd.org) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 30 Dec 2005 00:22:52 -0000 Message-ID: <43B47CB5.3C0F1632@freebsd.org> Date: Fri, 30 Dec 2005 01:17:57 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Markus Oestreicher References: <43B45EEF.6060800@x-trader.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: Fri, 30 Dec 2005 00:17:55 -0000 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