From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 22 11:43:42 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AEFD916A4B3 for ; Mon, 22 Sep 2003 11:43:42 -0700 (PDT) Received: from relay3.softcomca.com (relay3.softcomca.com [168.144.1.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8CE643FE1 for ; Mon, 22 Sep 2003 11:43:41 -0700 (PDT) (envelope-from akanwar@digitarchy.com) Received: from M2W048.mail2web.com ([168.144.251.155]) by relay3.softcomca.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 22 Sep 2003 14:43:40 -0400 Message-ID: <63340-220039122184340901@M2W048.mail2web.com> X-Priority: 3 X-Originating-IP: 68.111.37.3 X-URL: http://mail2web.com/ From: "akanwar@digitarchy.com" To: freebsd-hackers@freebsd.org Date: Mon, 22 Sep 2003 14:43:40 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 22 Sep 2003 18:43:40.0901 (UTC) FILETIME=[71365150:01C38139] Subject: HZ = 1000 slows down application X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: akanwar@digitarchy.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 18:43:42 -0000 Hi all, =20 I am expertmenting with kernel device polling on a 4=2E8-RELEASE system=2E= =20 The application I am running is a traffic pumping application that sits in= an infinite while loop=2E At the time of this test it was doing 6Mbps in a= nd 5Mbps out traffic=2E CPU usage is 40% without polling enabled, typical CPU= usage is roughly 1/3 user, 1/3 system and 1/3 interrupt=2E I am using the = fxp driver=2E I customized my kernel with HZ=3D1000 and enabled polling via sysctl=2E=2E= =2ECPU usage dropped from 40% to 30%=2E Great so far=2E But now I noticed that my application is occassionally doing slower iterations=2E Average iteration time used to be 0=2E2 ms without polling enabled=2E With the device polling changes, the average time is still arou= nd the same, but once every few minutes the application sees iterations that are 3=2E3 seconds (*seconds*, not a typo) long=2E=20 This seems to happen as soon as I use the kernel with HZ=3D1000=2E Enablin= g or disabling device polling does not seem to make any difference to this behavior=2E I am trying to understand why there seem to be a few really lo= ng iterations=2E Could it happen that the application does not get any CPU fo= r that long? Seems very counter intuitive that higher HZ should cause this=2E= =20 Could anyone shed any light on what is happening ? Thanks, -ansh -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web=2Ecom/ =2E