From owner-freebsd-questions@FreeBSD.ORG Sat Nov 21 01:25:05 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28C851065693 for ; Sat, 21 Nov 2009 01:25:05 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id C07538FC12 for ; Sat, 21 Nov 2009 01:25:04 +0000 (UTC) Received: from mx1.sbmail.office-on-the.net (mx1.sbmail.office-on-the.net [192.168.2.107]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 150867E853 for ; Fri, 20 Nov 2009 16:25:04 -0900 (AKST) Received: from dspam.sbmail.office-on-the.net (mx1.sbmail.office-on-the.net [192.168.2.107]) by mx1.sbmail.office-on-the.net (Postfix) with SMTP id 8203CC2CB05 for ; Fri, 20 Nov 2009 16:25:03 -0900 (AKST) Received: from webmail.testbox.ath.cx (mx1.sbmail.office-on-the.net [192.168.2.107]) by mx1.sbmail.office-on-the.net (Postfix) with ESMTP id 8BEB0C2CB04; Fri, 20 Nov 2009 16:25:02 -0900 (AKST) MIME-Version: 1.0 Date: Fri, 20 Nov 2009 16:25:02 -0900 From: Mel Flynn To: Brett Glass In-Reply-To: <200911202135.OAA18537@lariat.net> References: <200911202135.OAA18537@lariat.net> Message-ID: X-Sender: mel.flynn+fbsd.questions@mailing.thruhere.net User-Agent: RoundCube Webmail/0.2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-DSPAM-Result: Innocent X-DSPAM-Processed: Fri Nov 20 16:25:03 2009 X-DSPAM-Confidence: 1.0000 X-DSPAM-Improbability: 1 in 98689407 chance of being spam X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 89,4b07416f42366529791740 X-DSPAM-Factors: 27, time+was, 0.40000, cases+(e, 0.40000, but, 0.40000, >+HZ=4000, 0.40000, Received*2009+16, 0.40000, mode+would, 0.40000, just, 0.40000, default+of, 0.40000, incoming+packets, 0.40000, track, 0.40000, Received*Fri+20, 0.40000, all+>, 0.40000, or, 0.40000, the+device, 0.40000, In-Reply-To*<200911202135.OAA18537, 0.40000, Content-Type*charset="UTF+8", 0.40000, incrementing!, 0.40000, Normally, 0.40000, handler+taking, 0.40000, Received*webmail.testbox.ath.cx, 0.40000, from, 0.40000, From* List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Nov 2009 01:25:05 -0000 On Fri, 20 Nov 2009 14:35:22 -0700 (MST), Brett Glass wrote: > Everyone: >=20 > I've been experimenting with using device polling on a router with six > Ethernet > interfaces that handles lots of traffic. I turned polling on, and set > HZ=3D4000 > to minimize latency and ensure that enough time was allocated to handle all > of > the incoming packets. But the sysctl variable kernel.polling.lost_polls > keeps > incrementing! The documentation of this variable isn't very good, so I = am > not > sure what this means. Does it mean that I should set kern.hz lower (perhaps > to 2000) and kern.polling.burst_max higher? Or that running the interfaces > in interrupt-driven mode would be more effective? You likely have the HZ too high. First, see this description: http://www.pubbs.net/freebsd/200909/107087/ So that means that you give the kernel .25 microseconds to poll and act o= n any pending network IO. That's probably not enough. It is further explained b= y the comment in sys/kern/kern_poll.c: /* * Hook from hardclock. Tries to schedule a netisr, but keeps track * of lost ticks due to the previous handler taking too long. * Normally, this should not happen, because polling handler should * run for a short time. However, in some cases (e.g. when there are * changes in link status etc.) the drivers take a very long time * (even in the order of milliseconds) to reset and reconfigure the * device, causing apparent lost polls. * * The first part of the code is just for debugging purposes, and tries * to count how often hardclock ticks are shorter than they should, * meaning either stray interrupts or delayed events. */ I would start with the FreeBSD provided default of 1000HZ. If there are lost polls then, see if you can correlate it with link state changes. If not, then there may be issues with the driver and I would follow up to freebsd-net. If there are no lost polls, see if you can increase the frequency until they return. You also want to get some form of realworld measurement for these higher values: do they in effect increase network throughput. --=20 Mel