From owner-freebsd-net@FreeBSD.ORG Thu Mar 2 14:25:01 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 F164B16A420 for ; Thu, 2 Mar 2006 14:25:01 +0000 (GMT) (envelope-from tbyte@otel.net) Received: from mail.otel.net (gw3.OTEL.net [212.36.8.151]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BD3543D69 for ; Thu, 2 Mar 2006 14:24:58 +0000 (GMT) (envelope-from tbyte@otel.net) Received: from dragon.otel.net ([212.36.8.135]) by mail.otel.net with esmtp (Exim 4.60 (FreeBSD)) (envelope-from ) id 1FEojf-000CrU-Fa for freebsd-net@freebsd.org; Thu, 02 Mar 2006 16:24:56 +0200 From: Iasen Kostov To: FreeBSD Net In-Reply-To: <1141306007.70735.16.camel@DraGoN.OTEL.net> References: <1141306007.70735.16.camel@DraGoN.OTEL.net> Content-Type: text/plain Date: Thu, 02 Mar 2006 16:24:55 +0200 Message-Id: <1141309495.71876.4.camel@DraGoN.OTEL.net> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: Re: SMP NAT 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, 02 Mar 2006 14:25:02 -0000 On Thu, 2006-03-02 at 15:26 +0200, Iasen Kostov wrote: > Hi, > I'm now using a MP system (dual opteron) to do NAT for about 1500 > clients at once at speed above 200Mbit/sec full-duplex (e.g about > 400Mbit/sec) and I'm using PF to do the NAT. Bad thing is that the > second CPU is idle. As I can see from top - about 50% of the cpu is used > by irq handler for the ethernet adapter (irq27: bge0 bge1 - I'm using > only bge0 to route via VLANs) and about 30% by the network interrupt > handler. I guess that the swi1:net is handling the NAT (via PF) and if > swi1 and irq27 are in different handlers why they don't get executed on > different CPUs (second CPU is 98% idle and top show that both handlers > run on same CPU). Aren't both handlers in different kernel threads ? > If they are not - is it possible to be in different threads on different > CPUs ? > > It's 6.0-STABLE #0: Thu Dec 8 21:19:54 UTC 2005 on amd64. And no polling is used.