From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 22 14:22:06 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 EDB3416A4B3 for ; Mon, 22 Sep 2003 14:22:06 -0700 (PDT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF3E343F93 for ; Mon, 22 Sep 2003 14:22:05 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.3) with ESMTP id h8MLM2sd056154; Mon, 22 Sep 2003 14:22:02 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id h8MLM2OD056149; Mon, 22 Sep 2003 14:22:02 -0700 (PDT) (envelope-from rizzo) Date: Mon, 22 Sep 2003 14:22:02 -0700 From: Luigi Rizzo To: "akanwar@digitarchy.com" Message-ID: <20030922142202.A46421@xorpc.icir.org> References: <63340-220039122184340901@M2W048.mail2web.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <63340-220039122184340901@M2W048.mail2web.com>; from akanwar@digitarchy.com on Mon, Sep 22, 2003 at 02:43:40PM -0400 cc: freebsd-hackers@freebsd.org Subject: Re: HZ = 1000 slows down application X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list 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 21:22:07 -0000 On Mon, Sep 22, 2003 at 02:43:40PM -0400, akanwar@digitarchy.com wrote: ... > But now I noticed that my application is occassionally doing slower > iterations. Average iteration time used to be 0.2 ms without polling > enabled. With the device polling changes, the average time is still around > the same, but once every few minutes the application sees iterations that > are 3.3 seconds (*seconds*, not a typo) long. most likely your application makes some assumptions on the duration of a clock tick and then it gets confused when, say, a select returns quicker, or some time difference becomes negative, etc. etc. because of the finer granularity. very common type of bug. cheers luigi > This seems to happen as soon as I use the kernel with HZ=1000. Enabling or > disabling device polling does not seem to make any difference to this > behavior. I am trying to understand why there seem to be a few really long > iterations. Could it happen that the application does not get any CPU for > that long? Seems very counter intuitive that higher HZ should cause this. > > Could anyone shed any light on what is happening ? > > Thanks, > -ansh > > -------------------------------------------------------------------- > mail2web - Check your email from the web at > http://mail2web.com/ . > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >