From owner-freebsd-net@FreeBSD.ORG Fri Oct 31 03:32:05 2008 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 3893C106568A; Fri, 31 Oct 2008 03:32:05 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [66.246.138.153]) by mx1.freebsd.org (Postfix) with ESMTP id 0A58C8FC1C; Fri, 31 Oct 2008 03:32:04 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id C9CB2195FD; Thu, 30 Oct 2008 23:14:19 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,RDNS_NONE autolearn=no version=3.2.5 Received: from tau.draftnet (unknown [66.45.161.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Thu, 30 Oct 2008 23:14:19 -0400 (EDT) Date: Fri, 31 Oct 2008 04:13:50 +0000 From: Bruce Cran To: Ivan Voras Message-ID: <20081031041350.4e25edc7@tau.draftnet> In-Reply-To: References: <200810281235.53508.gizmen@blurp.pl> <4906EC8D.7070503@freebsd.org> <4906EE31.3080400@samoylyk.sumy.ua> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; amd64-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org Subject: Re: two NIC on 2 core system (scheduling problem) 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, 31 Oct 2008 03:32:05 -0000 On Tue, 28 Oct 2008 12:21:32 +0100 Ivan Voras wrote: > Oleksandr Samoylyk wrote: > > Ivan Voras wrote: > >> Bartosz Giza wrote: > >> > >>> Another question is why em0 taskq is eating so much cpu ? BGE > >>> interface is actually one that pushes 2 times more packets than > >>> em0 and it uses about half cpu comparing to em0. Is that not > >>> strange ? Could someone tell my why is this happening ? BGE is > >>> faster ? or maybe i can tune some > >> > >> I have the same problem - em0 taskq eating incredible amounts of > >> CPU. If you find a solution, contact me! > >> > >> > >=20 > > It could be not just a problem with em driver. > > Firstly, it's good to make profiling and find out what exactly eats > > CPU >=20 > Can you give any pointers on how to profile the driver and/or the > network stack? >=20 =46rom what I remember from a couple of years ago you can use hwpmc in system mode to profile the kernel if you have a supported CPU - I certainly remember seeing the output of gprof tell me the UDP checksum function was taking most of the time in a test I ran. To get started you need options HWPMC_HOOKS and device hwpmc in your kernel config (hwpmc can also be a module) - then you run pmcstat to run the test. There's lots more information at http://wiki.freebsd.org/PmcTools --=20 Bruce Cran