From owner-freebsd-net@FreeBSD.ORG Sat May 10 16:52:34 2003 Return-Path: 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 1579F37B401 for ; Sat, 10 May 2003 16:52:34 -0700 (PDT) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6408E43FDD for ; Sat, 10 May 2003 16:52:33 -0700 (PDT) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2653.19) id ; Sat, 10 May 2003 19:52:32 -0400 Message-ID: From: Don Bowman To: 'Bruce Evans' , Kevin Day Date: Sat, 10 May 2003 19:52:31 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" cc: freebsd-net@freebsd.org Subject: RE: polling(4) and idle time/cpu usage percentages X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 10 May 2003 23:52:34 -0000 From: Bruce Evans [mailto:bde@zeta.org.au] > On Sun, 4 May 2003, Kevin Day wrote: > > > I've got a FreeBSD system acting as a router, it's passing > 250-600mbps of > > traffic through it most of the time. > > > > Yesterday it was running 4.6-RELEASE without polling. I've > upgraded it to > > 4.8 and enabled polling. Before it was showing 30-50% CPU > use in interrupt > > and system combined. Now it's showing 0-1% (99% idle). > > > > Is this because it's polling in the idle loop, and time > spent doing this > > isn't getting accounted for anywhere, or is polling THAT > much more efficient? > > > > If it's the former, is it supposed to work this way? Now > I've got no clear > > way of knowing how busy the system is. (It's just routing > packets, really > > nothing more) > > The former. It's hard for it to work better without wasting too many > cycles for the accounting. In RELENG_4, everything done in the "idle" > loop is counted as idle time using the single counter > cp_time[CP_IDLE]. > This is very efficient. I tried this on my system, but I still end up with 0 system time. Does the machdep.cpu_idle_hlt=1 have any affect on this? I'm passing 1Gbps each way through a bridge (e.g. 1Gbps in and 1Gbps out each of 2 interfaces), and I have 88.4% idle. This is admittedly on a pretty fast processor, a 2x2.8GHz XEON.