From owner-freebsd-net@FreeBSD.ORG Fri Jun 27 18:34:47 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 3B910106566C for ; Fri, 27 Jun 2008 18:34:47 +0000 (UTC) (envelope-from paul@gtcomm.net) Received: from atlas.gtcomm.net (atlas.gtcomm.net [67.215.15.242]) by mx1.freebsd.org (Postfix) with ESMTP id 1022F8FC1D for ; Fri, 27 Jun 2008 18:34:47 +0000 (UTC) (envelope-from paul@gtcomm.net) Received: from c-76-108-179-28.hsd1.fl.comcast.net ([76.108.179.28] helo=[192.168.1.6]) by atlas.gtcomm.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1KCIjP-0004mA-GC; Fri, 27 Jun 2008 14:31:35 -0400 Message-ID: <48653340.8060301@gtcomm.net> Date: Fri, 27 Jun 2008 14:36:48 -0400 From: Paul User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: gnn@freebsd.org References: <48645D9E.7090303@gtcomm.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Net Subject: Re: Weirdness - FBSD 7, Routing, Packet generator, em taskq 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, 27 Jun 2008 18:34:47 -0000 I'm watching top -S -I -s1 -H This is just more of an observation.. I'm not having a problem with it, just wondering why it's doing it.. It's almost like most of the system processes in 'top' are a 3-5 minute average instead of an instant percentage. If this is intended behavior I simply wanted to know :) Curiousity Mainly. Also, isn't the emX taskq supposed to be using no cpu when polling is enabled? I'm trying to get em interface to take in 500kpps or more but it just won't do it. The max I can get is close to 400k and then it starts loading up on errors (out of receive buffers, rx overruns) mainly because the cpu is near 100% on em0 taskq. :( We need a SMP em driver for 7.0 :) No profiling yet... just messing around.. Intel Dual port pci-express nic , opteron 2212 , 7.0-stable now AMD64 seeing how much it will take before it errors out so I can figure out something to do with it.. :P Thanks :) Paul gnn@freebsd.org wrote: > At Thu, 26 Jun 2008 23:25:18 -0400, > Paul wrote: > >> I have a FreeBSD router set up with Full BGP routes and I'm doing some >> tests on using it for routing. >> >> 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #6: Thu Apr 17 18:11:49 EDT 2008 >> amd64 >> >> oddness..: >> >> Use a packet generator to generate random source ips and ports and send >> traffic through the router to a destination on the other side, single ip. >> What happens is the 'em0 taskq' starts to eat cpu... but the funny >> thing is immediately when I start the traffic (say, 100,000 pps) em0 >> taskq is about 15% cpu.. and then over the course of 2 minutes or so it >> climbs to 60% cpu.. This makes no sense.. The packets per second are >> continuous and it just routed 100kpps for 60 seconds with less cpu so >> why in the world would it slowly climb like that? >> >> It's an observation I suppose and I was hoping if someone could >> enlighten me on WHY.. :) I did test it on 3 different machines by the way. >> It even does this with just a handful of routes in the routing table , I >> tried that too just to rule that out. >> I don't remember Freebsd 4/5 doing this?? >> >> > > What are you using to measure the CPU time? Some tools take time to > gather up enough samples. Also, have you tried to do any profiling on > the kernel to see why this might be the case? > > http://www.watson.org/~robert/freebsd/netperf/profile/ > > Best, > George > >