From owner-freebsd-net@FreeBSD.ORG Sun Sep 13 12:18:47 2009 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 C6F40106566B for ; Sun, 13 Sep 2009 12:18:47 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from n6.bullet.mail.ac4.yahoo.com (n6.bullet.mail.ac4.yahoo.com [76.13.13.234]) by mx1.freebsd.org (Postfix) with SMTP id 7E7288FC1A for ; Sun, 13 Sep 2009 12:18:47 +0000 (UTC) Received: from [76.13.13.25] by n6.bullet.mail.ac4.yahoo.com with NNFMP; 13 Sep 2009 12:18:46 -0000 Received: from [76.13.10.175] by t4.bullet.mail.ac4.yahoo.com with NNFMP; 13 Sep 2009 12:18:46 -0000 Received: from [127.0.0.1] by omp116.mail.ac4.yahoo.com with NNFMP; 13 Sep 2009 12:18:46 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 745075.50100.bm@omp116.mail.ac4.yahoo.com Received: (qmail 64404 invoked by uid 60001); 13 Sep 2009 12:18:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1252844326; bh=tQGRJnKqIfx1RNQJ+VO+h1lJ4RjUQFVZ31X/Qi+lvXc=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=0s1Gc4nlO5YQZpmJXeaxFDh6zrYT0mnYrSih1n766NqhJSytj0bEYs/Ih8N0Us6HVA3C1I00XQ74SCT1NVTUUccHcQDubjpvFHNzeDmgaXXd+epaXVyXppBKGwAEysgORsplkLmvfszztUdIb9USQnr8H0PHZ6UmwB5fIi+mm5Q= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=XcBYNW+rJbuMyJRg0AhTtKHlezL60X7xTgPbbwWRw7TqipiGAHJTlXzkgswBsOxmJZAXm7jKtoNj9Ue6y5RBXQ6PCjvCs4SxEB8i81xn94qR7uGTEYk2ciXoaldqc/W1xaL0clBE0rOuHqVGTvfeeSNu8PXhTilCowMxLZCHiCo=; Message-ID: <651317.63257.qm@web63901.mail.re1.yahoo.com> X-YMail-OSG: V4dUTM0VM1njIrU3QegSdK9_m1_VZRWlrauE64jPQ481zqq4hmh8vj_WgAXB_ocDhj2KE2MWGTpW2OluY0azOZgXXZDRgYFdrL_XrjRJ_1Vr8IGalLK3EFznooFmKTci4upY04MbbqvXmHWApdA8rlw7.691fjzwkCW2MfMXBqNxFiQ2ixAyJwkf9HqqBpI33EIBehde7h__rgCcCrYlZw7FRsb4W7N636uxCX3.n1MFt.7qcxUE8dL5tA6zOKkUuW3umZQ.aAbjTFRZ1T0P2VnIrde14mFEwjZtFHjmm4oycvvN Received: from [98.203.21.152] by web63901.mail.re1.yahoo.com via HTTP; Sun, 13 Sep 2009 05:18:46 PDT X-Mailer: YahooMailClassic/6.1.2 YahooMailWebService/0.7.347.2 Date: Sun, 13 Sep 2009 05:18:46 -0700 (PDT) From: Barney Cordoba To: freebsd-net@freebsd.org, "rihad@mail.ru >> rihad" In-Reply-To: <4AAB4D56.30207@mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: [POLLING] strange interrupt/system load 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: Sun, 13 Sep 2009 12:18:47 -0000 =0A=0A--- On Sat, 9/12/09, rihad wrote:=0A=0A> From: rihad = =0A> Subject: [POLLING] strange interrupt/system load=0A> To= : freebsd-net@freebsd.org=0A> Date: Saturday, September 12, 2009, 3:27 AM= =0A> The box experiences ~230 mbit/s=0A> traffic flow through it. I've doub= led some sysctls after=0A> reading polling(4):=0A> kern.polling.each_burst= =3D10 # was: 5=0A> kern.polling.burst_max=3D350 # was: 150=0A> =0A> FreeBSD= 7.2-RELEASE-p3 amd64=0A> HZ=3D1000=0A> =0A> Now for the fun part.=0A> =0A>= With kern.polling.idle_poll =3D 1 top shows:=0A> CPU:=A0 0.0% user,=A0 0.0= % nice, 26.9% system,=A0=0A> 3.1% interrupt, 70.0% idle=0A> ~8000 interrupt= s/s total according to systat -vmstat:=0A> 1999 cpu0: time=0A> 2000 cpu1: t= ime=0A> 1999 cpu2: time=0A> 1999 cpu3: time=0A> =0A> With kern.polling.idle= _poll =3D 0 top shows:=0A> CPU:=A0 0.0% user,=A0 0.0% nice,=A0 0.0% system,= =0A> 13.9% interrupt, 86.0% idle=0A> Still the same ~8000 clock interrupts/= s.=0A> =0A> Under both scenarios polling is enabled on both em0 and em1=0A>= through ifconfig.=0A> =0A> =0A> 1) Why is the interrupt load relatively hi= gh with polling=0A> enabled?=0A> 2) How come 13.9% interrupts are not also = in the first=0A> scenario if their total rate is the same (~8000)?=0A> =0A>= Thanks.=0A=0AThe more important questions are:=0A=0A1) Why are you polling= with a NIC that can be precisely set to=0Ainterrupt as often or as little = as you like?=0A2) Why do so many people run systems with high network load = with=0AAMD64 builds when its significantly slower to do so? Do you have=0Ag= oogle sized databases so you need 64-bit pointers?=0A=0AAs to why you get i= nterrupt load, how do you think that polling is =0Aimplemented? By Magic? Y= ou are merely shifting the interrupt load=0Afrom the em driver to the softw= are interrupts. Running em drivers=0Awith AIM is essentially the same as po= lling without the associated=0Asystem overhead that polling introduces.=0A= =0ABarney=0A=0A=0A