From owner-freebsd-questions@FreeBSD.ORG Wed Jun 27 09:16:27 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BBEC916A421 for ; Wed, 27 Jun 2007 09:16:27 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from smtp.utwente.nl (smtp2.utsp.utwente.nl [130.89.2.9]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2E813C457 for ; Wed, 27 Jun 2007 09:16:27 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from lux.student.utwente.nl (lux.student.utwente.nl [130.89.170.81]) by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id l5R9GNUg009179; Wed, 27 Jun 2007 11:16:23 +0200 From: Pieter de Goeje To: freebsd-questions@freebsd.org Date: Wed, 27 Jun 2007 11:16:22 +0200 User-Agent: KMail/1.9.6 References: <200706262158.l5QLwe7x003949@cheyenne.sixcompanies.com> In-Reply-To: <200706262158.l5QLwe7x003949@cheyenne.sixcompanies.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706271116.23426.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact helpdesk@ITBE.utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Cc: JD Bronson Subject: Re: device polling on 6.2-stable..use? yes/no? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2007 09:16:27 -0000 On Tuesday 26 June 2007, JD Bronson wrote: > Anyone using device polling on 6.2stable (i386) ? I have been using it. > I have been reading up on this and seen some good and some bad but > nothing definitive. Basically you improve efficiency at the cost of latency, so expect lower CPU usage. To reduce latency one can increase HZ. > > I have bge NICs in these machines and they are running as routers, > and running pf. > > When I enabled it in the kernel and then via rc.conf (since sysctl > use is depreciated now) ...I can see a difference in "vmstat -i" > presuming thats the correct way to check. Yes that would work. > > With polling DISABLED...vmstat shows ever increasing values for example: > > vmstat -i > interrupt total rate > irq4: sio0 3 0 > irq6: fdc0 10 0 > irq14: ata0 12210 0 > irq15: ata1 78834 2 > irq22: bge0 430416 11 > irq23: bge1 917826 24 > cpu0: timer 75098549 2000 > cpu1: timer 75092636 1999 > Total 151630484 4038 > > and when I do a large network operation (like ftp an ISO) it > increases and increases....however, with device polling compiled and > configured (all default values though in sysctl) - I do not see an > increase in vmstat numbers for the nics...I figured thats good...but > I might be wrong? Yup that's good. With polling off, you should never see it increase much beyond ~8000 interrupts/sec, the theoretical limit for an 100mbit connection with 1500 mtu while doing a big transfer. You can also check with systat -vmstat 1. > > I dont do anything higher than WAN(10MB) and LAN(100MB). > > But if anyone has any suggestions or comments -especially values to > adjust in sysctl, please chime in. If you want lower latency (or if you experience packet loss) you could set the kern.hz tunable (in loader.conf) to something higher than the default 1000. I believe that people have been using 10000 for busy routers. Note that this will increase CPU load when the system has no packets to process. > > TIA > > -JD Cheers, Pieter de GOeje